Ruby 3.2.0dev (2022-06-11 revision 0e2c01bd094617f5c82759bdab03bb786ce89d56)
rb_mjit_min_header-3.0.4.h
1#ifdef __GNUC__
2# pragma GCC system_header
3#endif
4#define ALWAYS_INLINE(x) __attribute__ ((__always_inline__)) x
5typedef __builtin_va_list __gnuc_va_list;
6typedef __gnuc_va_list va_list;
7
8typedef long unsigned int size_t;
9typedef unsigned char __u_char;
10typedef unsigned short int __u_short;
11typedef unsigned int __u_int;
12typedef unsigned long int __u_long;
13typedef signed char __int8_t;
14typedef unsigned char __uint8_t;
15typedef signed short int __int16_t;
16typedef unsigned short int __uint16_t;
17typedef signed int __int32_t;
18typedef unsigned int __uint32_t;
19typedef signed long int __int64_t;
20typedef unsigned long int __uint64_t;
21typedef __int8_t __int_least8_t;
22typedef __uint8_t __uint_least8_t;
23typedef __int16_t __int_least16_t;
24typedef __uint16_t __uint_least16_t;
25typedef __int32_t __int_least32_t;
26typedef __uint32_t __uint_least32_t;
27typedef __int64_t __int_least64_t;
28typedef __uint64_t __uint_least64_t;
29typedef long int __quad_t;
30typedef unsigned long int __u_quad_t;
31typedef long int __intmax_t;
32typedef unsigned long int __uintmax_t;
33typedef unsigned long int __dev_t;
34typedef unsigned int __uid_t;
35typedef unsigned int __gid_t;
36typedef unsigned long int __ino_t;
37typedef unsigned long int __ino64_t;
38typedef unsigned int __mode_t;
39typedef unsigned long int __nlink_t;
40typedef long int __off_t;
41typedef long int __off64_t;
42typedef int __pid_t;
43typedef struct { int __val[2]; } __fsid_t;
44typedef long int __clock_t;
45typedef unsigned long int __rlim_t;
46typedef unsigned long int __rlim64_t;
47typedef unsigned int __id_t;
48typedef long int __time_t;
49typedef unsigned int __useconds_t;
50typedef long int __suseconds_t;
51typedef long int __suseconds64_t;
52typedef int __daddr_t;
53typedef int __key_t;
54typedef int __clockid_t;
55typedef void * __timer_t;
56typedef long int __blksize_t;
57typedef long int __blkcnt_t;
58typedef long int __blkcnt64_t;
59typedef unsigned long int __fsblkcnt_t;
60typedef unsigned long int __fsblkcnt64_t;
61typedef unsigned long int __fsfilcnt_t;
62typedef unsigned long int __fsfilcnt64_t;
63typedef long int __fsword_t;
64typedef long int __ssize_t;
65typedef long int __syscall_slong_t;
66typedef unsigned long int __syscall_ulong_t;
67typedef __off64_t __loff_t;
68typedef char *__caddr_t;
69typedef long int __intptr_t;
70typedef unsigned int __socklen_t;
71typedef int __sig_atomic_t;
72typedef struct
73{
74 int __count;
75 union
76 {
77 unsigned int __wch;
78 char __wchb[4];
79 } __value;
81typedef struct _G_fpos_t
82{
83 __off_t __pos;
84 __mbstate_t __state;
85} __fpos_t;
86typedef struct _G_fpos64_t
87{
88 __off64_t __pos;
89 __mbstate_t __state;
91struct _IO_FILE;
92typedef struct _IO_FILE __FILE;
93struct _IO_FILE;
94typedef struct _IO_FILE FILE;
95struct _IO_FILE;
96struct _IO_marker;
97struct _IO_codecvt;
98struct _IO_wide_data;
99typedef void _IO_lock_t;
100struct _IO_FILE
101{
102 int _flags;
103 char *_IO_read_ptr;
104 char *_IO_read_end;
105 char *_IO_read_base;
106 char *_IO_write_base;
107 char *_IO_write_ptr;
108 char *_IO_write_end;
109 char *_IO_buf_base;
110 char *_IO_buf_end;
111 char *_IO_save_base;
112 char *_IO_backup_base;
113 char *_IO_save_end;
114 struct _IO_marker *_markers;
115 struct _IO_FILE *_chain;
116 int _fileno;
117 int _flags2;
118 __off_t _old_offset;
119 unsigned short _cur_column;
120 signed char _vtable_offset;
121 char _shortbuf[1];
122 _IO_lock_t *_lock;
123 __off64_t _offset;
124 struct _IO_codecvt *_codecvt;
125 struct _IO_wide_data *_wide_data;
126 struct _IO_FILE *_freeres_list;
127 void *_freeres_buf;
128 size_t __pad5;
129 int _mode;
130 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
131};
132typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf,
133 size_t __nbytes);
134typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf,
135 size_t __nbytes);
136typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w);
137typedef int cookie_close_function_t (void *__cookie);
138typedef struct _IO_cookie_io_functions_t
139{
140 cookie_read_function_t *read;
141 cookie_write_function_t *write;
142 cookie_seek_function_t *seek;
143 cookie_close_function_t *close;
145typedef __off_t off_t;
146typedef __off64_t off64_t;
147typedef __ssize_t ssize_t;
148typedef __fpos_t fpos_t;
149typedef __fpos64_t fpos64_t;
150extern FILE *stdin;
151extern FILE *stdout;
152extern FILE *stderr;
153extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__));
154extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__));
155extern int renameat (int __oldfd, const char *__old, int __newfd,
156 const char *__new) __attribute__ ((__nothrow__ , __leaf__));
157extern int renameat2 (int __oldfd, const char *__old, int __newfd,
158 const char *__new, unsigned int __flags) __attribute__ ((__nothrow__ , __leaf__));
159extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__));
160extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__));
161extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
162extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
163extern char *tempnam (const char *__dir, const char *__pfx)
164 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
165extern int fclose (FILE *__stream);
166extern int fflush (FILE *__stream);
167extern int fflush_unlocked (FILE *__stream);
168extern int fcloseall (void);
169extern FILE *fopen (const char *__restrict __filename,
170 const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
171extern FILE *freopen (const char *__restrict __filename,
172 const char *__restrict __modes,
173 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
174extern FILE *fopen64 (const char *__restrict __filename,
175 const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
176extern FILE *freopen64 (const char *__restrict __filename,
177 const char *__restrict __modes,
178 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
179extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
180extern FILE *fopencookie (void *__restrict __magic_cookie,
181 const char *__restrict __modes,
182 cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
183extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
184 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
185extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
186extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
187extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
188 int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
189extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
190 size_t __size) __attribute__ ((__nothrow__ , __leaf__));
191extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
192extern int fprintf (FILE *__restrict __stream,
193 const char *__restrict __format, ...);
194extern int printf (const char *__restrict __format, ...);
195extern int sprintf (char *__restrict __s,
196 const char *__restrict __format, ...) __attribute__ ((__nothrow__));
197extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
198 __gnuc_va_list __arg);
199extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
200extern int vsprintf (char *__restrict __s, const char *__restrict __format,
201 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
202extern int snprintf (char *__restrict __s, size_t __maxlen,
203 const char *__restrict __format, ...)
204 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
205extern int vsnprintf (char *__restrict __s, size_t __maxlen,
206 const char *__restrict __format, __gnuc_va_list __arg)
207 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
208extern int vasprintf (char **__restrict __ptr, const char *__restrict __f,
209 __gnuc_va_list __arg)
210 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__));
211extern int __asprintf (char **__restrict __ptr,
212 const char *__restrict __fmt, ...)
213 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
214extern int asprintf (char **__restrict __ptr,
215 const char *__restrict __fmt, ...)
216 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
217extern int vdprintf (int __fd, const char *__restrict __fmt,
218 __gnuc_va_list __arg)
219 __attribute__ ((__format__ (__printf__, 2, 0)));
220extern int dprintf (int __fd, const char *__restrict __fmt, ...)
221 __attribute__ ((__format__ (__printf__, 2, 3)));
222extern int fscanf (FILE *__restrict __stream,
223 const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
224extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
225extern int sscanf (const char *__restrict __s,
226 const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__));
227extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") __attribute__ ((__warn_unused_result__));
228extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") __attribute__ ((__warn_unused_result__));
229extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ , __leaf__));
230extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
231 __gnuc_va_list __arg)
232 __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
233extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
234 __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
235extern int vsscanf (const char *__restrict __s,
236 const char *__restrict __format, __gnuc_va_list __arg)
237 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
238extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")
239 __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
240extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")
241 __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
242extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ , __leaf__))
243 __attribute__ ((__format__ (__scanf__, 2, 0)));
244extern int fgetc (FILE *__stream);
245extern int getc (FILE *__stream);
246extern int getchar (void);
247extern int getc_unlocked (FILE *__stream);
248extern int getchar_unlocked (void);
249extern int fgetc_unlocked (FILE *__stream);
250extern int fputc (int __c, FILE *__stream);
251extern int putc (int __c, FILE *__stream);
252extern int putchar (int __c);
253extern int fputc_unlocked (int __c, FILE *__stream);
254extern int putc_unlocked (int __c, FILE *__stream);
255extern int putchar_unlocked (int __c);
256extern int getw (FILE *__stream);
257extern int putw (int __w, FILE *__stream);
258extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
259 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
260extern char *fgets_unlocked (char *__restrict __s, int __n,
261 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__))
262 __attribute__ ((__access__ (__write_only__, 1, 2)));
263extern __ssize_t __getdelim (char **__restrict __lineptr,
264 size_t *__restrict __n, int __delimiter,
265 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
266extern __ssize_t getdelim (char **__restrict __lineptr,
267 size_t *__restrict __n, int __delimiter,
268 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
269extern __ssize_t getline (char **__restrict __lineptr,
270 size_t *__restrict __n,
271 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
272extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
273extern int puts (const char *__s);
274extern int ungetc (int __c, FILE *__stream);
275extern size_t fread (void *__restrict __ptr, size_t __size,
276 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
277extern size_t fwrite (const void *__restrict __ptr, size_t __size,
278 size_t __n, FILE *__restrict __s);
279extern int fputs_unlocked (const char *__restrict __s,
280 FILE *__restrict __stream);
281extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
282 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
283extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
284 size_t __n, FILE *__restrict __stream);
285extern int fseek (FILE *__stream, long int __off, int __whence);
286extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__));
287extern void rewind (FILE *__stream);
288extern int fseeko (FILE *__stream, __off_t __off, int __whence);
289extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__));
290extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
291extern int fsetpos (FILE *__stream, const fpos_t *__pos);
292extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
293extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__));
294extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
295extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos);
296extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
297extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
298extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
299extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
300extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
301extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
302extern void perror (const char *__s);
303extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
304extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
305extern FILE *popen (const char *__command, const char *__modes) __attribute__ ((__warn_unused_result__));
306extern int pclose (FILE *__stream);
307extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__));
308extern char *cuserid (char *__s);
309struct obstack;
310extern int obstack_printf (struct obstack *__restrict __obstack,
311 const char *__restrict __format, ...)
312 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3)));
313extern int obstack_vprintf (struct obstack *__restrict __obstack,
314 const char *__restrict __format,
315 __gnuc_va_list __args)
316 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0)));
317extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
318extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
319extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
320extern int __uflow (FILE *);
321extern int __overflow (FILE *, int);
322extern __inline __attribute__ ((__gnu_inline__)) int
323getchar (void)
324{
325 return getc (stdin);
326}
327extern __inline __attribute__ ((__gnu_inline__)) int
328fgetc_unlocked (FILE *__fp)
329{
330 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
331}
332extern __inline __attribute__ ((__gnu_inline__)) int
333getc_unlocked (FILE *__fp)
334{
335 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
336}
337extern __inline __attribute__ ((__gnu_inline__)) int
338getchar_unlocked (void)
339{
340 return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
341}
342extern __inline __attribute__ ((__gnu_inline__)) int
343putchar (int __c)
344{
345 return putc (__c, stdout);
346}
347extern __inline __attribute__ ((__gnu_inline__)) int
348fputc_unlocked (int __c, FILE *__stream)
349{
350 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
351}
352extern __inline __attribute__ ((__gnu_inline__)) int
353putc_unlocked (int __c, FILE *__stream)
354{
355 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
356}
357extern __inline __attribute__ ((__gnu_inline__)) int
358putchar_unlocked (int __c)
359{
360 return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
361}
362extern __inline __attribute__ ((__gnu_inline__)) __ssize_t
363getline (char **__lineptr, size_t *__n, FILE *__stream)
364{
365 return __getdelim (__lineptr, __n, '\n', __stream);
366}
367extern __inline __attribute__ ((__gnu_inline__)) int
368__attribute__ ((__nothrow__ , __leaf__)) feof_unlocked (FILE *__stream)
369{
370 return (((__stream)->_flags & 0x0010) != 0);
371}
372extern __inline __attribute__ ((__gnu_inline__)) int
373__attribute__ ((__nothrow__ , __leaf__)) ferror_unlocked (FILE *__stream)
374{
375 return (((__stream)->_flags & 0x0020) != 0);
376}
377extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
378 const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__))
379 __attribute__ ((__access__ (__write_only__, 1, 3)));
380extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
381 const char *__restrict __format,
382 __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__))
383 __attribute__ ((__access__ (__write_only__, 1, 3)));
384extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
385__attribute__ ((__nothrow__ , __leaf__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...)
386{
387 return __builtin___sprintf_chk (__s, 2 - 1,
388 __builtin_object_size (__s, 2 > 1), __fmt,
389 __builtin_va_arg_pack ());
390}
391extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
392__attribute__ ((__nothrow__ , __leaf__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap)
393{
394 return __builtin___vsprintf_chk (__s, 2 - 1,
395 __builtin_object_size (__s, 2 > 1), __fmt, __ap);
396}
397extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
398 size_t __slen, const char *__restrict __format,
399 ...) __attribute__ ((__nothrow__ , __leaf__))
400 __attribute__ ((__access__ (__write_only__, 1, 2)));
401extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
402 size_t __slen, const char *__restrict __format,
403 __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__));
404extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
405__attribute__ ((__nothrow__ , __leaf__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...)
406{
407 return __builtin___snprintf_chk (__s, __n, 2 - 1,
408 __builtin_object_size (__s, 2 > 1), __fmt,
409 __builtin_va_arg_pack ());
410}
411extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
412__attribute__ ((__nothrow__ , __leaf__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap)
413{
414 return __builtin___vsnprintf_chk (__s, __n, 2 - 1,
415 __builtin_object_size (__s, 2 > 1), __fmt, __ap);
416}
417extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
418 const char *__restrict __format, ...);
419extern int __printf_chk (int __flag, const char *__restrict __format, ...);
420extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
421 const char *__restrict __format, __gnuc_va_list __ap);
422extern int __vprintf_chk (int __flag, const char *__restrict __format,
423 __gnuc_va_list __ap);
424extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
425fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
426{
427 return __fprintf_chk (__stream, 2 - 1, __fmt,
428 __builtin_va_arg_pack ());
429}
430extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
431printf (const char *__restrict __fmt, ...)
432{
433 return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ());
434}
435extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
436vprintf (const char *__restrict __fmt, __gnuc_va_list __ap)
437{
438 return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap);
439}
440extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
441vfprintf (FILE *__restrict __stream,
442 const char *__restrict __fmt, __gnuc_va_list __ap)
443{
444 return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap);
445}
446extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
447 ...) __attribute__ ((__format__ (__printf__, 3, 4)));
448extern int __vdprintf_chk (int __fd, int __flag,
449 const char *__restrict __fmt, __gnuc_va_list __arg)
450 __attribute__ ((__format__ (__printf__, 3, 0)));
451extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
452dprintf (int __fd, const char *__restrict __fmt, ...)
453{
454 return __dprintf_chk (__fd, 2 - 1, __fmt,
455 __builtin_va_arg_pack ());
456}
457extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
458vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap)
459{
460 return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap);
461}
462extern int __asprintf_chk (char **__restrict __ptr, int __flag,
463 const char *__restrict __fmt, ...)
464 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__));
465extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
466 const char *__restrict __fmt, __gnuc_va_list __arg)
467 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__));
468extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
469 int __flag, const char *__restrict __format,
470 ...)
471 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4)));
472extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
473 int __flag,
474 const char *__restrict __format,
475 __gnuc_va_list __args)
476 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0)));
477extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
478__attribute__ ((__nothrow__ , __leaf__)) asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...)
479{
480 return __asprintf_chk (__ptr, 2 - 1, __fmt,
481 __builtin_va_arg_pack ());
482}
483extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
484__attribute__ ((__nothrow__ , __leaf__)) __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...)
485{
486 return __asprintf_chk (__ptr, 2 - 1, __fmt,
487 __builtin_va_arg_pack ());
488}
489extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
490__attribute__ ((__nothrow__ , __leaf__)) obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __fmt, ...)
491{
492 return __obstack_printf_chk (__obstack, 2 - 1, __fmt,
493 __builtin_va_arg_pack ());
494}
495extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
496__attribute__ ((__nothrow__ , __leaf__)) vasprintf (char **__restrict __ptr, const char *__restrict __fmt, __gnuc_va_list __ap)
497{
498 return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap);
499}
500extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
501__attribute__ ((__nothrow__ , __leaf__)) obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __fmt, __gnuc_va_list __ap)
502{
503 return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt,
504 __ap);
505}
506extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
507 FILE *__restrict __stream)
508 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 3)));
509extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets")
510 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
511extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk")
512 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer")));
513extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))) char *
514fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
515{
516 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
517 {
518 if (!__builtin_constant_p (__n) || __n <= 0)
519 return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
520 if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
521 return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
522 }
523 return __fgets_alias (__s, __n, __stream);
524}
525extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
526 size_t __size, size_t __n,
527 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
528extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") __attribute__ ((__warn_unused_result__));
529extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk")
530 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer")));
531extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
532fread (void *__restrict __ptr, size_t __size, size_t __n,
533 FILE *__restrict __stream)
534{
535 if (__builtin_object_size (__ptr, 0) != (size_t) -1)
536 {
537 if (!__builtin_constant_p (__size)
538 || !__builtin_constant_p (__n)
539 || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
540 return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
541 __stream);
542 if (__size * __n > __builtin_object_size (__ptr, 0))
543 return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
544 __stream);
545 }
546 return __fread_alias (__ptr, __size, __n, __stream);
547}
548extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
549 int __n, FILE *__restrict __stream)
550 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 3)));
551extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked")
552 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
553extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk")
554 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer")));
555extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))) char *
556fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
557{
558 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
559 {
560 if (!__builtin_constant_p (__n) || __n <= 0)
561 return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n,
562 __stream);
563 if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
564 return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n,
565 __stream);
566 }
567 return __fgets_unlocked_alias (__s, __n, __stream);
568}
569extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
570 size_t __size, size_t __n,
571 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
572extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") __attribute__ ((__warn_unused_result__));
573extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk")
574 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer")));
575extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
576fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
577 FILE *__restrict __stream)
578{
579 if (__builtin_object_size (__ptr, 0) != (size_t) -1)
580 {
581 if (!__builtin_constant_p (__size)
582 || !__builtin_constant_p (__n)
583 || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
584 return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size,
585 __n, __stream);
586 if (__size * __n > __builtin_object_size (__ptr, 0))
587 return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0),
588 __size, __n, __stream);
589 }
590 if (__builtin_constant_p (__size)
591 && __builtin_constant_p (__n)
592 && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
593 && __size * __n <= 8)
594 {
595 size_t __cnt = __size * __n;
596 char *__cptr = (char *) __ptr;
597 if (__cnt == 0)
598 return 0;
599 for (; __cnt > 0; --__cnt)
600 {
601 int __c = getc_unlocked (__stream);
602 if (__c == (-1))
603 break;
604 *__cptr++ = __c;
605 }
606 return (__cptr - (char *) __ptr) / __size;
607 }
608 return __fread_unlocked_alias (__ptr, __size, __n, __stream);
609}
610
611
612typedef __u_char u_char;
613typedef __u_short u_short;
614typedef __u_int u_int;
615typedef __u_long u_long;
616typedef __quad_t quad_t;
617typedef __u_quad_t u_quad_t;
618typedef __fsid_t fsid_t;
619typedef __loff_t loff_t;
620typedef __ino_t ino_t;
621typedef __ino64_t ino64_t;
622typedef __dev_t dev_t;
623typedef __gid_t gid_t;
624typedef __mode_t mode_t;
625typedef __nlink_t nlink_t;
626typedef __uid_t uid_t;
627typedef __pid_t pid_t;
628typedef __id_t id_t;
629typedef __daddr_t daddr_t;
630typedef __caddr_t caddr_t;
631typedef __key_t key_t;
632typedef __clock_t clock_t;
633typedef __clockid_t clockid_t;
634typedef __time_t time_t;
635typedef __timer_t timer_t;
636typedef __useconds_t useconds_t;
637typedef __suseconds_t suseconds_t;
638typedef unsigned long int ulong;
639typedef unsigned short int ushort;
640typedef unsigned int uint;
641typedef __int8_t int8_t;
642typedef __int16_t int16_t;
643typedef __int32_t int32_t;
644typedef __int64_t int64_t;
645typedef __uint8_t u_int8_t;
646typedef __uint16_t u_int16_t;
647typedef __uint32_t u_int32_t;
648typedef __uint64_t u_int64_t;
649typedef int register_t __attribute__ ((__mode__ (__word__)));
650static __inline __uint16_t
651__bswap_16 (__uint16_t __bsx)
652{
653 return __builtin_bswap16 (__bsx);
654}
655static __inline __uint32_t
656__bswap_32 (__uint32_t __bsx)
657{
658 return __builtin_bswap32 (__bsx);
659}
660__extension__ static __inline __uint64_t
661__bswap_64 (__uint64_t __bsx)
662{
663 return __builtin_bswap64 (__bsx);
664}
665static __inline __uint16_t
666__uint16_identity (__uint16_t __x)
667{
668 return __x;
669}
670static __inline __uint32_t
671__uint32_identity (__uint32_t __x)
672{
673 return __x;
674}
675static __inline __uint64_t
676__uint64_identity (__uint64_t __x)
677{
678 return __x;
679}
680typedef struct
681{
682 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
683} __sigset_t;
684typedef __sigset_t sigset_t;
685struct timeval
686{
687 __time_t tv_sec;
688 __suseconds_t tv_usec;
689};
690struct timespec
691{
692 __time_t tv_sec;
693 __syscall_slong_t tv_nsec;
694};
695typedef long int __fd_mask;
696typedef struct
697 {
698 __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
699 } fd_set;
700typedef __fd_mask fd_mask;
701
702extern int select (int __nfds, fd_set *__restrict __readfds,
703 fd_set *__restrict __writefds,
704 fd_set *__restrict __exceptfds,
705 struct timeval *__restrict __timeout);
706extern int pselect (int __nfds, fd_set *__restrict __readfds,
707 fd_set *__restrict __writefds,
708 fd_set *__restrict __exceptfds,
709 const struct timespec *__restrict __timeout,
710 const __sigset_t *__restrict __sigmask);
711extern long int __fdelt_chk (long int __d);
712extern long int __fdelt_warn (long int __d)
713 __attribute__((__warning__ ("bit outside of fd_set selected")));
714
715typedef __blksize_t blksize_t;
716typedef __blkcnt_t blkcnt_t;
717typedef __fsblkcnt_t fsblkcnt_t;
718typedef __fsfilcnt_t fsfilcnt_t;
719typedef __blkcnt64_t blkcnt64_t;
720typedef __fsblkcnt64_t fsblkcnt64_t;
721typedef __fsfilcnt64_t fsfilcnt64_t;
722typedef struct __pthread_internal_list
723{
724 struct __pthread_internal_list *__prev;
725 struct __pthread_internal_list *__next;
727typedef struct __pthread_internal_slist
728{
729 struct __pthread_internal_slist *__next;
732{
733 int __lock;
734 unsigned int __count;
735 int __owner;
736 unsigned int __nusers;
737 int __kind;
738 short __spins;
739 short __elision;
740 __pthread_list_t __list;
741};
743{
744 unsigned int __readers;
745 unsigned int __writers;
746 unsigned int __wrphase_futex;
747 unsigned int __writers_futex;
748 unsigned int __pad3;
749 unsigned int __pad4;
750 int __cur_writer;
751 int __shared;
752 signed char __rwelision;
753 unsigned char __pad1[7];
754 unsigned long int __pad2;
755 unsigned int __flags;
756};
757struct __pthread_cond_s
758{
759 __extension__ union
760 {
761 __extension__ unsigned long long int __wseq;
762 struct
763 {
764 unsigned int __low;
765 unsigned int __high;
766 } __wseq32;
767 };
768 __extension__ union
769 {
770 __extension__ unsigned long long int __g1_start;
771 struct
772 {
773 unsigned int __low;
774 unsigned int __high;
775 } __g1_start32;
776 };
777 unsigned int __g_refs[2] ;
778 unsigned int __g_size[2];
779 unsigned int __g1_orig_size;
780 unsigned int __wrefs;
781 unsigned int __g_signals[2];
782};
783typedef unsigned int __tss_t;
784typedef unsigned long int __thrd_t;
785typedef struct
786{
787 int __data ;
789typedef unsigned long int pthread_t;
790typedef union
791{
792 char __size[4];
793 int __align;
795typedef union
796{
797 char __size[4];
798 int __align;
800typedef unsigned int pthread_key_t;
801typedef int pthread_once_t;
802union pthread_attr_t
803{
804 char __size[56];
805 long int __align;
806};
807typedef union pthread_attr_t pthread_attr_t;
808typedef union
809{
810 struct __pthread_mutex_s __data;
811 char __size[40];
812 long int __align;
814typedef union
815{
816 struct __pthread_cond_s __data;
817 char __size[48];
818 __extension__ long long int __align;
820typedef union
821{
822 struct __pthread_rwlock_arch_t __data;
823 char __size[56];
824 long int __align;
826typedef union
827{
828 char __size[8];
829 long int __align;
831typedef volatile int pthread_spinlock_t;
832typedef union
833{
834 char __size[32];
835 long int __align;
837typedef union
838{
839 char __size[4];
840 int __align;
842
843
844struct stat
845 {
846 __dev_t st_dev;
847 __ino_t st_ino;
848 __nlink_t st_nlink;
849 __mode_t st_mode;
850 __uid_t st_uid;
851 __gid_t st_gid;
852 int __pad0;
853 __dev_t st_rdev;
854 __off_t st_size;
855 __blksize_t st_blksize;
856 __blkcnt_t st_blocks;
857 struct timespec st_atim;
858 struct timespec st_mtim;
859 struct timespec st_ctim;
860 __syscall_slong_t __glibc_reserved[3];
861 };
862struct stat64
863 {
864 __dev_t st_dev;
865 __ino64_t st_ino;
866 __nlink_t st_nlink;
867 __mode_t st_mode;
868 __uid_t st_uid;
869 __gid_t st_gid;
870 int __pad0;
871 __dev_t st_rdev;
872 __off_t st_size;
873 __blksize_t st_blksize;
874 __blkcnt64_t st_blocks;
875 struct timespec st_atim;
876 struct timespec st_mtim;
877 struct timespec st_ctim;
878 __syscall_slong_t __glibc_reserved[3];
879 };
880extern int stat (const char *__restrict __file,
881 struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
882extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
883extern int stat64 (const char *__restrict __file,
884 struct stat64 *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
885extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
886extern int fstatat (int __fd, const char *__restrict __file,
887 struct stat *__restrict __buf, int __flag)
888 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
889extern int fstatat64 (int __fd, const char *__restrict __file,
890 struct stat64 *__restrict __buf, int __flag)
891 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
892extern int lstat (const char *__restrict __file,
893 struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
894extern int lstat64 (const char *__restrict __file,
895 struct stat64 *__restrict __buf)
896 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
897extern int chmod (const char *__file, __mode_t __mode)
898 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
899extern int lchmod (const char *__file, __mode_t __mode)
900 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
901extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__));
902extern int fchmodat (int __fd, const char *__file, __mode_t __mode,
903 int __flag)
904 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
905extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ , __leaf__));
906extern __mode_t getumask (void) __attribute__ ((__nothrow__ , __leaf__));
907extern int mkdir (const char *__path, __mode_t __mode)
908 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
909extern int mkdirat (int __fd, const char *__path, __mode_t __mode)
910 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
911extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)
912 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
913extern int mknodat (int __fd, const char *__path, __mode_t __mode,
914 __dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
915extern int mkfifo (const char *__path, __mode_t __mode)
916 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
917extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
918 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
919extern int utimensat (int __fd, const char *__path,
920 const struct timespec __times[2],
921 int __flags)
922 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
923extern int futimens (int __fd, const struct timespec __times[2]) __attribute__ ((__nothrow__ , __leaf__));
924typedef __signed__ char __s8;
925typedef unsigned char __u8;
926typedef __signed__ short __s16;
927typedef unsigned short __u16;
928typedef __signed__ int __s32;
929typedef unsigned int __u32;
930__extension__ typedef __signed__ long long __s64;
931__extension__ typedef unsigned long long __u64;
932typedef struct {
933 unsigned long fds_bits[1024 / (8 * sizeof(long))];
935typedef void (*__kernel_sighandler_t)(int);
936typedef int __kernel_key_t;
937typedef int __kernel_mqd_t;
938typedef unsigned short __kernel_old_uid_t;
939typedef unsigned short __kernel_old_gid_t;
940typedef unsigned long __kernel_old_dev_t;
941typedef long __kernel_long_t;
942typedef unsigned long __kernel_ulong_t;
943typedef __kernel_ulong_t __kernel_ino_t;
944typedef unsigned int __kernel_mode_t;
945typedef int __kernel_pid_t;
946typedef int __kernel_ipc_pid_t;
947typedef unsigned int __kernel_uid_t;
948typedef unsigned int __kernel_gid_t;
949typedef __kernel_long_t __kernel_suseconds_t;
950typedef int __kernel_daddr_t;
951typedef unsigned int __kernel_uid32_t;
952typedef unsigned int __kernel_gid32_t;
953typedef __kernel_ulong_t __kernel_size_t;
954typedef __kernel_long_t __kernel_ssize_t;
955typedef __kernel_long_t __kernel_ptrdiff_t;
956typedef struct {
957 int val[2];
959typedef __kernel_long_t __kernel_off_t;
960typedef long long __kernel_loff_t;
961typedef __kernel_long_t __kernel_old_time_t;
962typedef __kernel_long_t __kernel_time_t;
963typedef long long __kernel_time64_t;
964typedef __kernel_long_t __kernel_clock_t;
965typedef int __kernel_timer_t;
966typedef int __kernel_clockid_t;
967typedef char * __kernel_caddr_t;
968typedef unsigned short __kernel_uid16_t;
969typedef unsigned short __kernel_gid16_t;
970typedef __u16 __le16;
971typedef __u16 __be16;
972typedef __u32 __le32;
973typedef __u32 __be32;
974typedef __u64 __le64;
975typedef __u64 __be64;
976typedef __u16 __sum16;
977typedef __u32 __wsum;
978typedef unsigned __poll_t;
979struct statx_timestamp {
980 __s64 tv_sec;
981 __u32 tv_nsec;
982 __s32 __reserved;
983};
984struct statx {
985 __u32 stx_mask;
986 __u32 stx_blksize;
987 __u64 stx_attributes;
988 __u32 stx_nlink;
989 __u32 stx_uid;
990 __u32 stx_gid;
991 __u16 stx_mode;
992 __u16 __spare0[1];
993 __u64 stx_ino;
994 __u64 stx_size;
995 __u64 stx_blocks;
996 __u64 stx_attributes_mask;
997 struct statx_timestamp stx_atime;
998 struct statx_timestamp stx_btime;
999 struct statx_timestamp stx_ctime;
1000 struct statx_timestamp stx_mtime;
1001 __u32 stx_rdev_major;
1002 __u32 stx_rdev_minor;
1003 __u32 stx_dev_major;
1004 __u32 stx_dev_minor;
1005 __u64 stx_mnt_id;
1006 __u64 __spare2;
1007 __u64 __spare3[12];
1008};
1009
1010int statx (int __dirfd, const char *__restrict __path, int __flags,
1011 unsigned int __mask, struct statx *__restrict __buf)
1012 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 5)));
1013
1014
1015typedef int wchar_t;
1016
1017typedef struct
1018 {
1019 int quot;
1020 int rem;
1021 } div_t;
1022typedef struct
1023 {
1024 long int quot;
1025 long int rem;
1026 } ldiv_t;
1027__extension__ typedef struct
1028 {
1029 long long int quot;
1030 long long int rem;
1031 } lldiv_t;
1032extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1033extern double atof (const char *__nptr)
1034 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1035extern int atoi (const char *__nptr)
1036 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1037extern long int atol (const char *__nptr)
1038 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1039__extension__ extern long long int atoll (const char *__nptr)
1040 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1041extern double strtod (const char *__restrict __nptr,
1042 char **__restrict __endptr)
1043 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1044extern float strtof (const char *__restrict __nptr,
1045 char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1046extern long double strtold (const char *__restrict __nptr,
1047 char **__restrict __endptr)
1048 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1049extern _Float32 strtof32 (const char *__restrict __nptr,
1050 char **__restrict __endptr)
1051 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1052extern _Float64 strtof64 (const char *__restrict __nptr,
1053 char **__restrict __endptr)
1054 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1055extern _Float128 strtof128 (const char *__restrict __nptr,
1056 char **__restrict __endptr)
1057 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1058extern _Float32x strtof32x (const char *__restrict __nptr,
1059 char **__restrict __endptr)
1060 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1061extern _Float64x strtof64x (const char *__restrict __nptr,
1062 char **__restrict __endptr)
1063 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1064extern long int strtol (const char *__restrict __nptr,
1065 char **__restrict __endptr, int __base)
1066 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1067extern unsigned long int strtoul (const char *__restrict __nptr,
1068 char **__restrict __endptr, int __base)
1069 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1070__extension__
1071extern long long int strtoq (const char *__restrict __nptr,
1072 char **__restrict __endptr, int __base)
1073 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1074__extension__
1075extern unsigned long long int strtouq (const char *__restrict __nptr,
1076 char **__restrict __endptr, int __base)
1077 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1078__extension__
1079extern long long int strtoll (const char *__restrict __nptr,
1080 char **__restrict __endptr, int __base)
1081 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1082__extension__
1083extern unsigned long long int strtoull (const char *__restrict __nptr,
1084 char **__restrict __endptr, int __base)
1085 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1086extern int strfromd (char *__dest, size_t __size, const char *__format,
1087 double __f)
1088 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1089extern int strfromf (char *__dest, size_t __size, const char *__format,
1090 float __f)
1091 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1092extern int strfroml (char *__dest, size_t __size, const char *__format,
1093 long double __f)
1094 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1095extern int strfromf32 (char *__dest, size_t __size, const char * __format,
1096 _Float32 __f)
1097 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1098extern int strfromf64 (char *__dest, size_t __size, const char * __format,
1099 _Float64 __f)
1100 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1101extern int strfromf128 (char *__dest, size_t __size, const char * __format,
1102 _Float128 __f)
1103 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1104extern int strfromf32x (char *__dest, size_t __size, const char * __format,
1105 _Float32x __f)
1106 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1107extern int strfromf64x (char *__dest, size_t __size, const char * __format,
1108 _Float64x __f)
1109 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1110struct __locale_struct
1111{
1112 struct __locale_data *__locales[13];
1113 const unsigned short int *__ctype_b;
1114 const int *__ctype_tolower;
1115 const int *__ctype_toupper;
1116 const char *__names[13];
1117};
1118typedef struct __locale_struct *__locale_t;
1119typedef __locale_t locale_t;
1120extern long int strtol_l (const char *__restrict __nptr,
1121 char **__restrict __endptr, int __base,
1122 locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1123extern unsigned long int strtoul_l (const char *__restrict __nptr,
1124 char **__restrict __endptr,
1125 int __base, locale_t __loc)
1126 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1127__extension__
1128extern long long int strtoll_l (const char *__restrict __nptr,
1129 char **__restrict __endptr, int __base,
1130 locale_t __loc)
1131 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1132__extension__
1133extern unsigned long long int strtoull_l (const char *__restrict __nptr,
1134 char **__restrict __endptr,
1135 int __base, locale_t __loc)
1136 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1137extern double strtod_l (const char *__restrict __nptr,
1138 char **__restrict __endptr, locale_t __loc)
1139 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1140extern float strtof_l (const char *__restrict __nptr,
1141 char **__restrict __endptr, locale_t __loc)
1142 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1143extern long double strtold_l (const char *__restrict __nptr,
1144 char **__restrict __endptr,
1145 locale_t __loc)
1146 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1147extern _Float32 strtof32_l (const char *__restrict __nptr,
1148 char **__restrict __endptr,
1149 locale_t __loc)
1150 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1151extern _Float64 strtof64_l (const char *__restrict __nptr,
1152 char **__restrict __endptr,
1153 locale_t __loc)
1154 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1155extern _Float128 strtof128_l (const char *__restrict __nptr,
1156 char **__restrict __endptr,
1157 locale_t __loc)
1158 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1159extern _Float32x strtof32x_l (const char *__restrict __nptr,
1160 char **__restrict __endptr,
1161 locale_t __loc)
1162 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1163extern _Float64x strtof64x_l (const char *__restrict __nptr,
1164 char **__restrict __endptr,
1165 locale_t __loc)
1166 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1167extern __inline __attribute__ ((__gnu_inline__)) int
1168__attribute__ ((__nothrow__ , __leaf__)) atoi (const char *__nptr)
1169{
1170 return (int) strtol (__nptr, (char **) ((void *)0), 10);
1171}
1172extern __inline __attribute__ ((__gnu_inline__)) long int
1173__attribute__ ((__nothrow__ , __leaf__)) atol (const char *__nptr)
1174{
1175 return strtol (__nptr, (char **) ((void *)0), 10);
1176}
1177__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int
1178__attribute__ ((__nothrow__ , __leaf__)) atoll (const char *__nptr)
1179{
1180 return strtoll (__nptr, (char **) ((void *)0), 10);
1181}
1182extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1183extern long int a64l (const char *__s)
1184 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1185extern long int random (void) __attribute__ ((__nothrow__ , __leaf__));
1186extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
1187extern char *initstate (unsigned int __seed, char *__statebuf,
1188 size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1189extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1190struct random_data
1191 {
1192 int32_t *fptr;
1193 int32_t *rptr;
1194 int32_t *state;
1195 int rand_type;
1196 int rand_deg;
1197 int rand_sep;
1198 int32_t *end_ptr;
1199 };
1200extern int random_r (struct random_data *__restrict __buf,
1201 int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1202extern int srandom_r (unsigned int __seed, struct random_data *__buf)
1203 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1204extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
1205 size_t __statelen,
1206 struct random_data *__restrict __buf)
1207 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
1208extern int setstate_r (char *__restrict __statebuf,
1209 struct random_data *__restrict __buf)
1210 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1211extern int rand (void) __attribute__ ((__nothrow__ , __leaf__));
1212extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
1213extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__));
1214extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__));
1215extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1216extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
1217extern long int nrand48 (unsigned short int __xsubi[3])
1218 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1219extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
1220extern long int jrand48 (unsigned short int __xsubi[3])
1221 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1222extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__));
1223extern unsigned short int *seed48 (unsigned short int __seed16v[3])
1224 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1225extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1226struct drand48_data
1227 {
1228 unsigned short int __x[3];
1229 unsigned short int __old_x[3];
1230 unsigned short int __c;
1231 unsigned short int __init;
1232 __extension__ unsigned long long int __a;
1233 };
1234extern int drand48_r (struct drand48_data *__restrict __buffer,
1235 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1236extern int erand48_r (unsigned short int __xsubi[3],
1237 struct drand48_data *__restrict __buffer,
1238 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1239extern int lrand48_r (struct drand48_data *__restrict __buffer,
1240 long int *__restrict __result)
1241 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1242extern int nrand48_r (unsigned short int __xsubi[3],
1243 struct drand48_data *__restrict __buffer,
1244 long int *__restrict __result)
1245 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1246extern int mrand48_r (struct drand48_data *__restrict __buffer,
1247 long int *__restrict __result)
1248 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1249extern int jrand48_r (unsigned short int __xsubi[3],
1250 struct drand48_data *__restrict __buffer,
1251 long int *__restrict __result)
1252 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1253extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
1254 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1255extern int seed48_r (unsigned short int __seed16v[3],
1256 struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1257extern int lcong48_r (unsigned short int __param[7],
1258 struct drand48_data *__buffer)
1259 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1260extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__))
1261 __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__));
1262extern void *calloc (size_t __nmemb, size_t __size)
1263 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1, 2))) __attribute__ ((__warn_unused_result__));
1264extern void *realloc (void *__ptr, size_t __size)
1265 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2)));
1266extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
1267 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
1268 __attribute__ ((__alloc_size__ (2, 3)));
1269extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
1270
1271extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__));
1272
1273extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__))
1274 __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__));
1275extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
1276 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1277extern void *aligned_alloc (size_t __alignment, size_t __size)
1278 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) __attribute__ ((__warn_unused_result__));
1279extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1280extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1281extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1282extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
1283 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1284extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1285extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1286extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1287extern char *getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1288extern char *secure_getenv (const char *__name)
1289 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1290extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1291extern int setenv (const char *__name, const char *__value, int __replace)
1292 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1293extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1294extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__));
1295extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1296extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1297extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1298extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1299extern int mkstemps64 (char *__template, int __suffixlen)
1300 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1301extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1302extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1303extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1304extern int mkostemps (char *__template, int __suffixlen, int __flags)
1305 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1306extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
1307 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1308extern int system (const char *__command) __attribute__ ((__warn_unused_result__));
1309extern char *canonicalize_file_name (const char *__name)
1310 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1311extern char *realpath (const char *__restrict __name,
1312 char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1313typedef int (*__compar_fn_t) (const void *, const void *);
1314typedef __compar_fn_t comparison_fn_t;
1315typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
1316extern void *bsearch (const void *__key, const void *__base,
1317 size_t __nmemb, size_t __size, __compar_fn_t __compar)
1318 __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__));
1319extern __inline __attribute__ ((__gnu_inline__)) void *
1320bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
1321 __compar_fn_t __compar)
1322{
1323 size_t __l, __u, __idx;
1324 const void *__p;
1325 int __comparison;
1326 __l = 0;
1327 __u = __nmemb;
1328 while (__l < __u)
1329 {
1330 __idx = (__l + __u) / 2;
1331 __p = (void *) (((const char *) __base) + (__idx * __size));
1332 __comparison = (*__compar) (__key, __p);
1333 if (__comparison < 0)
1334 __u = __idx;
1335 else if (__comparison > 0)
1336 __l = __idx + 1;
1337 else
1338 return (void *) __p;
1339 }
1340 return ((void *)0);
1341}
1342extern void qsort (void *__base, size_t __nmemb, size_t __size,
1343 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
1344extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
1345 __compar_d_fn_t __compar, void *__arg)
1346 __attribute__ ((__nonnull__ (1, 4)));
1347extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1348extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1349__extension__ extern long long int llabs (long long int __x)
1350 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1351extern div_t div (int __numer, int __denom)
1352 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1353extern ldiv_t ldiv (long int __numer, long int __denom)
1354 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1355__extension__ extern lldiv_t lldiv (long long int __numer,
1356 long long int __denom)
1357 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1358extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
1359 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1360extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
1361 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1362extern char *gcvt (double __value, int __ndigit, char *__buf)
1363 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
1364extern char *qecvt (long double __value, int __ndigit,
1365 int *__restrict __decpt, int *__restrict __sign)
1366 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1367extern char *qfcvt (long double __value, int __ndigit,
1368 int *__restrict __decpt, int *__restrict __sign)
1369 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1370extern char *qgcvt (long double __value, int __ndigit, char *__buf)
1371 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
1372extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
1373 int *__restrict __sign, char *__restrict __buf,
1374 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1375extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
1376 int *__restrict __sign, char *__restrict __buf,
1377 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1378extern int qecvt_r (long double __value, int __ndigit,
1379 int *__restrict __decpt, int *__restrict __sign,
1380 char *__restrict __buf, size_t __len)
1381 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1382extern int qfcvt_r (long double __value, int __ndigit,
1383 int *__restrict __decpt, int *__restrict __sign,
1384 char *__restrict __buf, size_t __len)
1385 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1386extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
1387extern int mbtowc (wchar_t *__restrict __pwc,
1388 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
1389extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__));
1390extern size_t mbstowcs (wchar_t *__restrict __pwcs,
1391 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__))
1392 __attribute__ ((__access__ (__read_only__, 2)));
1393extern size_t wcstombs (char *__restrict __s,
1394 const wchar_t *__restrict __pwcs, size_t __n)
1395 __attribute__ ((__nothrow__ , __leaf__))
1396 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
1397extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1398extern int getsubopt (char **__restrict __optionp,
1399 char *const *__restrict __tokens,
1400 char **__restrict __valuep)
1401 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__));
1402extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__));
1403extern int grantpt (int __fd) __attribute__ ((__nothrow__ , __leaf__));
1404extern int unlockpt (int __fd) __attribute__ ((__nothrow__ , __leaf__));
1405extern char *ptsname (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1406extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
1407 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3)));
1408extern int getpt (void);
1409extern int getloadavg (double __loadavg[], int __nelem)
1410 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1411extern __inline __attribute__ ((__gnu_inline__)) double
1412__attribute__ ((__nothrow__ , __leaf__)) atof (const char *__nptr)
1413{
1414 return strtod (__nptr, (char **) ((void *)0));
1415}
1416extern char *__realpath_chk (const char *__restrict __name,
1417 char *__restrict __resolved,
1418 size_t __resolvedlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1419extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1420extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
1421 __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer")));
1422extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
1423__attribute__ ((__nothrow__ , __leaf__)) realpath (const char *__restrict __name, char *__restrict __resolved)
1424{
1425 if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1)
1426 {
1427 return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1));
1428 }
1429 return __realpath_alias (__name, __resolved);
1430}
1431extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen,
1432 size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)))
1433 __attribute__ ((__access__ (__write_only__, 2, 3)));
1434extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__ , __leaf__))
1435 __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3)));
1436extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
1437 __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf")));
1438extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
1439__attribute__ ((__nothrow__ , __leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen)
1440{
1441 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
1442 {
1443 if (!__builtin_constant_p (__buflen))
1444 return __ptsname_r_chk (__fd, __buf, __buflen,
1445 __builtin_object_size (__buf, 2 > 1));
1446 if (__buflen > __builtin_object_size (__buf, 2 > 1))
1447 return __ptsname_r_chk_warn (__fd, __buf, __buflen,
1448 __builtin_object_size (__buf, 2 > 1));
1449 }
1450 return __ptsname_r_alias (__fd, __buf, __buflen);
1451}
1452extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
1453 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1454extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1455extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int
1456__attribute__ ((__nothrow__ , __leaf__)) wctomb (char *__s, wchar_t __wchar)
1457{
1458 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1
1459 && 16 > __builtin_object_size (__s, 2 > 1))
1460 return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1));
1461 return __wctomb_alias (__s, __wchar);
1462}
1463extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,
1464 const char *__restrict __src,
1465 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__))
1466 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
1467extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__))
1468 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
1469extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__ , __leaf__))
1470 __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)")));
1471extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
1472__attribute__ ((__nothrow__ , __leaf__)) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len)
1473{
1474 if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
1475 {
1476 if (!__builtin_constant_p (__len))
1477 return __mbstowcs_chk (__dst, __src, __len,
1478 __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
1479 if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t))
1480 return __mbstowcs_chk_warn (__dst, __src, __len,
1481 (__builtin_object_size (__dst, 2 > 1)
1482 / sizeof (wchar_t)));
1483 }
1484 return __mbstowcs_alias (__dst, __src, __len);
1485}
1486extern size_t __wcstombs_chk (char *__restrict __dst,
1487 const wchar_t *__restrict __src,
1488 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__))
1489 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
1490extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__ , __leaf__))
1491 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
1492extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__ , __leaf__))
1493 __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len")));
1494extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
1495__attribute__ ((__nothrow__ , __leaf__)) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len)
1496{
1497 if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
1498 {
1499 if (!__builtin_constant_p (__len))
1500 return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
1501 if (__len > __builtin_object_size (__dst, 2 > 1))
1502 return __wcstombs_chk_warn (__dst, __src, __len,
1503 __builtin_object_size (__dst, 2 > 1));
1504 }
1505 return __wcstombs_alias (__dst, __src, __len);
1506}
1507
1508typedef long int ptrdiff_t;
1509
1510extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
1511 size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1512extern void *memmove (void *__dest, const void *__src, size_t __n)
1513 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1514extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
1515 int __c, size_t __n)
1516 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__access__ (__write_only__, 1, 4)));
1517extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1518extern int memcmp (const void *__s1, const void *__s2, size_t __n)
1519 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1520extern void *memchr (const void *__s, int __c, size_t __n)
1521 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1522extern void *rawmemchr (const void *__s, int __c)
1523 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1524extern void *memrchr (const void *__s, int __c, size_t __n)
1525 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)))
1526 __attribute__ ((__access__ (__read_only__, 1, 3)));
1527extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
1528 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1529extern char *strncpy (char *__restrict __dest,
1530 const char *__restrict __src, size_t __n)
1531 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1532extern char *strcat (char *__restrict __dest, const char *__restrict __src)
1533 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1534extern char *strncat (char *__restrict __dest, const char *__restrict __src,
1535 size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1536extern int strcmp (const char *__s1, const char *__s2)
1537 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1538extern int strncmp (const char *__s1, const char *__s2, size_t __n)
1539 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1540extern int strcoll (const char *__s1, const char *__s2)
1541 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1542extern size_t strxfrm (char *__restrict __dest,
1543 const char *__restrict __src, size_t __n)
1544 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 1, 3)));
1545extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l)
1546 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1547extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
1548 locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)))
1549 __attribute__ ((__access__ (__write_only__, 1, 3)));
1550extern char *strdup (const char *__s)
1551 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1552extern char *strndup (const char *__string, size_t __n)
1553 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1554extern char *strchr (const char *__s, int __c)
1555 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1556extern char *strrchr (const char *__s, int __c)
1557 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1558extern char *strchrnul (const char *__s, int __c)
1559 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1560extern size_t strcspn (const char *__s, const char *__reject)
1561 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1562extern size_t strspn (const char *__s, const char *__accept)
1563 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1564extern char *strpbrk (const char *__s, const char *__accept)
1565 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1566extern char *strstr (const char *__haystack, const char *__needle)
1567 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1568extern char *strtok (char *__restrict __s, const char *__restrict __delim)
1569 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1570extern char *__strtok_r (char *__restrict __s,
1571 const char *__restrict __delim,
1572 char **__restrict __save_ptr)
1573 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
1574extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
1575 char **__restrict __save_ptr)
1576 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
1577extern char *strcasestr (const char *__haystack, const char *__needle)
1578 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1579extern void *memmem (const void *__haystack, size_t __haystacklen,
1580 const void *__needle, size_t __needlelen)
1581 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)))
1582 __attribute__ ((__access__ (__read_only__, 1, 2)))
1583 __attribute__ ((__access__ (__read_only__, 3, 4)));
1584extern void *__mempcpy (void *__restrict __dest,
1585 const void *__restrict __src, size_t __n)
1586 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1587extern void *mempcpy (void *__restrict __dest,
1588 const void *__restrict __src, size_t __n)
1589 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1590extern size_t strlen (const char *__s)
1591 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1592extern size_t strnlen (const char *__string, size_t __maxlen)
1593 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1594extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__));
1595extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
1596 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
1597extern const char *strerrordesc_np (int __err) __attribute__ ((__nothrow__ , __leaf__));
1598extern const char *strerrorname_np (int __err) __attribute__ ((__nothrow__ , __leaf__));
1599extern char *strerror_l (int __errnum, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
1600
1601extern int bcmp (const void *__s1, const void *__s2, size_t __n)
1602 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1603extern void bcopy (const void *__src, void *__dest, size_t __n)
1604 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1605extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1606extern char *index (const char *__s, int __c)
1607 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1608extern char *rindex (const char *__s, int __c)
1609 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1610extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1611extern int ffsl (long int __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1612__extension__ extern int ffsll (long long int __ll)
1613 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1614extern int strcasecmp (const char *__s1, const char *__s2)
1615 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1616extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
1617 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1618extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc)
1619 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1620extern int strncasecmp_l (const char *__s1, const char *__s2,
1621 size_t __n, locale_t __loc)
1622 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
1623
1624extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
1625__attribute__ ((__nothrow__ , __leaf__)) bcopy (const void *__src, void *__dest, size_t __len)
1626{
1627 (void) __builtin___memmove_chk (__dest, __src, __len,
1628 __builtin_object_size (__dest, 0));
1629}
1630extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
1631__attribute__ ((__nothrow__ , __leaf__)) bzero (void *__dest, size_t __len)
1632{
1633 (void) __builtin___memset_chk (__dest, '\0', __len,
1634 __builtin_object_size (__dest, 0));
1635}
1636extern void explicit_bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
1637 __attribute__ ((__access__ (__write_only__, 1, 2)));
1638extern char *strsep (char **__restrict __stringp,
1639 const char *__restrict __delim)
1640 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1641extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
1642extern const char *sigabbrev_np (int __sig) __attribute__ ((__nothrow__ , __leaf__));
1643extern const char *sigdescr_np (int __sig) __attribute__ ((__nothrow__ , __leaf__));
1644extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
1645 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1646extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)
1647 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1648extern char *__stpncpy (char *__restrict __dest,
1649 const char *__restrict __src, size_t __n)
1650 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1651extern char *stpncpy (char *__restrict __dest,
1652 const char *__restrict __src, size_t __n)
1653 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1654extern int strverscmp (const char *__s1, const char *__s2)
1655 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1656extern char *strfry (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1657extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
1658 __attribute__ ((__access__ (__write_only__, 1, 2)));
1659extern char *basename (const char *__filename) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1660extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1661__attribute__ ((__nothrow__ , __leaf__)) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
1662{
1663 return __builtin___memcpy_chk (__dest, __src, __len,
1664 __builtin_object_size (__dest, 0));
1665}
1666extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1667__attribute__ ((__nothrow__ , __leaf__)) memmove (void *__dest, const void *__src, size_t __len)
1668{
1669 return __builtin___memmove_chk (__dest, __src, __len,
1670 __builtin_object_size (__dest, 0));
1671}
1672extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1673__attribute__ ((__nothrow__ , __leaf__)) mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
1674{
1675 return __builtin___mempcpy_chk (__dest, __src, __len,
1676 __builtin_object_size (__dest, 0));
1677}
1678extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1679__attribute__ ((__nothrow__ , __leaf__)) memset (void *__dest, int __ch, size_t __len)
1680{
1681 return __builtin___memset_chk (__dest, __ch, __len,
1682 __builtin_object_size (__dest, 0));
1683}
1684void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
1685 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
1686extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
1687__attribute__ ((__nothrow__ , __leaf__)) explicit_bzero (void *__dest, size_t __len)
1688{
1689 __explicit_bzero_chk (__dest, __len, __builtin_object_size (__dest, 0));
1690}
1691extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1692__attribute__ ((__nothrow__ , __leaf__)) strcpy (char *__restrict __dest, const char *__restrict __src)
1693{
1694 return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
1695}
1696extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1697__attribute__ ((__nothrow__ , __leaf__)) stpcpy (char *__restrict __dest, const char *__restrict __src)
1698{
1699 return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
1700}
1701extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1702__attribute__ ((__nothrow__ , __leaf__)) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len)
1703{
1704 return __builtin___strncpy_chk (__dest, __src, __len,
1705 __builtin_object_size (__dest, 2 > 1));
1706}
1707extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1708__attribute__ ((__nothrow__ , __leaf__)) stpncpy (char *__dest, const char *__src, size_t __n)
1709{
1710 return __builtin___stpncpy_chk (__dest, __src, __n,
1711 __builtin_object_size (__dest, 2 > 1));
1712}
1713extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1714__attribute__ ((__nothrow__ , __leaf__)) strcat (char *__restrict __dest, const char *__restrict __src)
1715{
1716 return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
1717}
1718extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1719__attribute__ ((__nothrow__ , __leaf__)) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len)
1720{
1721 return __builtin___strncat_chk (__dest, __src, __len,
1722 __builtin_object_size (__dest, 2 > 1));
1723}
1724
1725typedef __uint8_t uint8_t;
1726typedef __uint16_t uint16_t;
1727typedef __uint32_t uint32_t;
1728typedef __uint64_t uint64_t;
1729typedef __int_least8_t int_least8_t;
1730typedef __int_least16_t int_least16_t;
1731typedef __int_least32_t int_least32_t;
1732typedef __int_least64_t int_least64_t;
1733typedef __uint_least8_t uint_least8_t;
1734typedef __uint_least16_t uint_least16_t;
1735typedef __uint_least32_t uint_least32_t;
1736typedef __uint_least64_t uint_least64_t;
1737typedef signed char int_fast8_t;
1738typedef long int int_fast16_t;
1739typedef long int int_fast32_t;
1740typedef long int int_fast64_t;
1741typedef unsigned char uint_fast8_t;
1742typedef unsigned long int uint_fast16_t;
1743typedef unsigned long int uint_fast32_t;
1744typedef unsigned long int uint_fast64_t;
1745typedef long int intptr_t;
1746typedef unsigned long int uintptr_t;
1747typedef __intmax_t intmax_t;
1748typedef __uintmax_t uintmax_t;
1749typedef int __gwchar_t;
1750
1751typedef struct
1752 {
1753 long int quot;
1754 long int rem;
1755 } imaxdiv_t;
1756extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1757extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
1758 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1759extern intmax_t strtoimax (const char *__restrict __nptr,
1760 char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__));
1761extern uintmax_t strtoumax (const char *__restrict __nptr,
1762 char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__));
1763extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr,
1764 __gwchar_t **__restrict __endptr, int __base)
1765 __attribute__ ((__nothrow__ , __leaf__));
1766extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
1767 __gwchar_t ** __restrict __endptr, int __base)
1768 __attribute__ ((__nothrow__ , __leaf__));
1769
1770
1771typedef __socklen_t socklen_t;
1772extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1773extern int euidaccess (const char *__name, int __type)
1774 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1775extern int eaccess (const char *__name, int __type)
1776 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1777extern int faccessat (int __fd, const char *__file, int __type, int __flag)
1778 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
1779extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ , __leaf__));
1780extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
1781 __attribute__ ((__nothrow__ , __leaf__));
1782extern int close (int __fd);
1783extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__))
1784 __attribute__ ((__access__ (__write_only__, 2, 3)));
1785extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__))
1786 __attribute__ ((__access__ (__read_only__, 2, 3)));
1787extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
1788 __off_t __offset) __attribute__ ((__warn_unused_result__))
1789 __attribute__ ((__access__ (__write_only__, 2, 3)));
1790extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
1791 __off_t __offset) __attribute__ ((__warn_unused_result__))
1792 __attribute__ ((__access__ (__read_only__, 2, 3)));
1793extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
1794 __off64_t __offset) __attribute__ ((__warn_unused_result__))
1795 __attribute__ ((__access__ (__write_only__, 2, 3)));
1796extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n,
1797 __off64_t __offset) __attribute__ ((__warn_unused_result__))
1798 __attribute__ ((__access__ (__read_only__, 2, 3)));
1799extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1800extern int pipe2 (int __pipedes[2], int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1801extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__));
1802extern unsigned int sleep (unsigned int __seconds);
1803extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
1804 __attribute__ ((__nothrow__ , __leaf__));
1805extern int usleep (__useconds_t __useconds);
1806extern int pause (void);
1807extern int chown (const char *__file, __uid_t __owner, __gid_t __group)
1808 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1809extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1810extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)
1811 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1812extern int fchownat (int __fd, const char *__file, __uid_t __owner,
1813 __gid_t __group, int __flag)
1814 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
1815extern int chdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1816extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1817extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
1818 __attribute__ ((__access__ (__write_only__, 1, 2)));
1819extern char *get_current_dir_name (void) __attribute__ ((__nothrow__ , __leaf__));
1820extern char *getwd (char *__buf)
1821 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__))
1822 __attribute__ ((__access__ (__write_only__, 1)));
1823extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1824extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__));
1825extern int dup3 (int __fd, int __fd2, int __flags) __attribute__ ((__nothrow__ , __leaf__));
1826extern char **__environ;
1827extern char **environ;
1828extern int execve (const char *__path, char *const __argv[],
1829 char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1830extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
1831 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1832extern int execv (const char *__path, char *const __argv[])
1833 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1834extern int execle (const char *__path, const char *__arg, ...)
1835 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1836extern int execl (const char *__path, const char *__arg, ...)
1837 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1838extern int execvp (const char *__file, char *const __argv[])
1839 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1840extern int execlp (const char *__file, const char *__arg, ...)
1841 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1842extern int execvpe (const char *__file, char *const __argv[],
1843 char *const __envp[])
1844 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1845extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1846extern void _exit (int __status) __attribute__ ((__noreturn__));
1847enum
1848 {
1849 _PC_LINK_MAX,
1850 _PC_MAX_CANON,
1851 _PC_MAX_INPUT,
1852 _PC_NAME_MAX,
1853 _PC_PATH_MAX,
1854 _PC_PIPE_BUF,
1855 _PC_CHOWN_RESTRICTED,
1856 _PC_NO_TRUNC,
1857 _PC_VDISABLE,
1858 _PC_SYNC_IO,
1859 _PC_ASYNC_IO,
1860 _PC_PRIO_IO,
1861 _PC_SOCK_MAXBUF,
1862 _PC_FILESIZEBITS,
1863 _PC_REC_INCR_XFER_SIZE,
1864 _PC_REC_MAX_XFER_SIZE,
1865 _PC_REC_MIN_XFER_SIZE,
1866 _PC_REC_XFER_ALIGN,
1867 _PC_ALLOC_SIZE_MIN,
1868 _PC_SYMLINK_MAX,
1869 _PC_2_SYMLINKS
1870 };
1871enum
1872 {
1873 _SC_ARG_MAX,
1874 _SC_CHILD_MAX,
1875 _SC_CLK_TCK,
1876 _SC_NGROUPS_MAX,
1877 _SC_OPEN_MAX,
1878 _SC_STREAM_MAX,
1879 _SC_TZNAME_MAX,
1880 _SC_JOB_CONTROL,
1881 _SC_SAVED_IDS,
1882 _SC_REALTIME_SIGNALS,
1883 _SC_PRIORITY_SCHEDULING,
1884 _SC_TIMERS,
1885 _SC_ASYNCHRONOUS_IO,
1886 _SC_PRIORITIZED_IO,
1887 _SC_SYNCHRONIZED_IO,
1888 _SC_FSYNC,
1889 _SC_MAPPED_FILES,
1890 _SC_MEMLOCK,
1891 _SC_MEMLOCK_RANGE,
1892 _SC_MEMORY_PROTECTION,
1893 _SC_MESSAGE_PASSING,
1894 _SC_SEMAPHORES,
1895 _SC_SHARED_MEMORY_OBJECTS,
1896 _SC_AIO_LISTIO_MAX,
1897 _SC_AIO_MAX,
1898 _SC_AIO_PRIO_DELTA_MAX,
1899 _SC_DELAYTIMER_MAX,
1900 _SC_MQ_OPEN_MAX,
1901 _SC_MQ_PRIO_MAX,
1902 _SC_VERSION,
1903 _SC_PAGESIZE,
1904 _SC_RTSIG_MAX,
1905 _SC_SEM_NSEMS_MAX,
1906 _SC_SEM_VALUE_MAX,
1907 _SC_SIGQUEUE_MAX,
1908 _SC_TIMER_MAX,
1909 _SC_BC_BASE_MAX,
1910 _SC_BC_DIM_MAX,
1911 _SC_BC_SCALE_MAX,
1912 _SC_BC_STRING_MAX,
1913 _SC_COLL_WEIGHTS_MAX,
1914 _SC_EQUIV_CLASS_MAX,
1915 _SC_EXPR_NEST_MAX,
1916 _SC_LINE_MAX,
1917 _SC_RE_DUP_MAX,
1918 _SC_CHARCLASS_NAME_MAX,
1919 _SC_2_VERSION,
1920 _SC_2_C_BIND,
1921 _SC_2_C_DEV,
1922 _SC_2_FORT_DEV,
1923 _SC_2_FORT_RUN,
1924 _SC_2_SW_DEV,
1925 _SC_2_LOCALEDEF,
1926 _SC_PII,
1927 _SC_PII_XTI,
1928 _SC_PII_SOCKET,
1929 _SC_PII_INTERNET,
1930 _SC_PII_OSI,
1931 _SC_POLL,
1932 _SC_SELECT,
1933 _SC_UIO_MAXIOV,
1934 _SC_IOV_MAX = _SC_UIO_MAXIOV,
1935 _SC_PII_INTERNET_STREAM,
1936 _SC_PII_INTERNET_DGRAM,
1937 _SC_PII_OSI_COTS,
1938 _SC_PII_OSI_CLTS,
1939 _SC_PII_OSI_M,
1940 _SC_T_IOV_MAX,
1941 _SC_THREADS,
1942 _SC_THREAD_SAFE_FUNCTIONS,
1943 _SC_GETGR_R_SIZE_MAX,
1944 _SC_GETPW_R_SIZE_MAX,
1945 _SC_LOGIN_NAME_MAX,
1946 _SC_TTY_NAME_MAX,
1947 _SC_THREAD_DESTRUCTOR_ITERATIONS,
1948 _SC_THREAD_KEYS_MAX,
1949 _SC_THREAD_STACK_MIN,
1950 _SC_THREAD_THREADS_MAX,
1951 _SC_THREAD_ATTR_STACKADDR,
1952 _SC_THREAD_ATTR_STACKSIZE,
1953 _SC_THREAD_PRIORITY_SCHEDULING,
1954 _SC_THREAD_PRIO_INHERIT,
1955 _SC_THREAD_PRIO_PROTECT,
1956 _SC_THREAD_PROCESS_SHARED,
1957 _SC_NPROCESSORS_CONF,
1958 _SC_NPROCESSORS_ONLN,
1959 _SC_PHYS_PAGES,
1960 _SC_AVPHYS_PAGES,
1961 _SC_ATEXIT_MAX,
1962 _SC_PASS_MAX,
1963 _SC_XOPEN_VERSION,
1964 _SC_XOPEN_XCU_VERSION,
1965 _SC_XOPEN_UNIX,
1966 _SC_XOPEN_CRYPT,
1967 _SC_XOPEN_ENH_I18N,
1968 _SC_XOPEN_SHM,
1969 _SC_2_CHAR_TERM,
1970 _SC_2_C_VERSION,
1971 _SC_2_UPE,
1972 _SC_XOPEN_XPG2,
1973 _SC_XOPEN_XPG3,
1974 _SC_XOPEN_XPG4,
1975 _SC_CHAR_BIT,
1976 _SC_CHAR_MAX,
1977 _SC_CHAR_MIN,
1978 _SC_INT_MAX,
1979 _SC_INT_MIN,
1980 _SC_LONG_BIT,
1981 _SC_WORD_BIT,
1982 _SC_MB_LEN_MAX,
1983 _SC_NZERO,
1984 _SC_SSIZE_MAX,
1985 _SC_SCHAR_MAX,
1986 _SC_SCHAR_MIN,
1987 _SC_SHRT_MAX,
1988 _SC_SHRT_MIN,
1989 _SC_UCHAR_MAX,
1990 _SC_UINT_MAX,
1991 _SC_ULONG_MAX,
1992 _SC_USHRT_MAX,
1993 _SC_NL_ARGMAX,
1994 _SC_NL_LANGMAX,
1995 _SC_NL_MSGMAX,
1996 _SC_NL_NMAX,
1997 _SC_NL_SETMAX,
1998 _SC_NL_TEXTMAX,
1999 _SC_XBS5_ILP32_OFF32,
2000 _SC_XBS5_ILP32_OFFBIG,
2001 _SC_XBS5_LP64_OFF64,
2002 _SC_XBS5_LPBIG_OFFBIG,
2003 _SC_XOPEN_LEGACY,
2004 _SC_XOPEN_REALTIME,
2005 _SC_XOPEN_REALTIME_THREADS,
2006 _SC_ADVISORY_INFO,
2007 _SC_BARRIERS,
2008 _SC_BASE,
2009 _SC_C_LANG_SUPPORT,
2010 _SC_C_LANG_SUPPORT_R,
2011 _SC_CLOCK_SELECTION,
2012 _SC_CPUTIME,
2013 _SC_THREAD_CPUTIME,
2014 _SC_DEVICE_IO,
2015 _SC_DEVICE_SPECIFIC,
2016 _SC_DEVICE_SPECIFIC_R,
2017 _SC_FD_MGMT,
2018 _SC_FIFO,
2019 _SC_PIPE,
2020 _SC_FILE_ATTRIBUTES,
2021 _SC_FILE_LOCKING,
2022 _SC_FILE_SYSTEM,
2023 _SC_MONOTONIC_CLOCK,
2024 _SC_MULTI_PROCESS,
2025 _SC_SINGLE_PROCESS,
2026 _SC_NETWORKING,
2027 _SC_READER_WRITER_LOCKS,
2028 _SC_SPIN_LOCKS,
2029 _SC_REGEXP,
2030 _SC_REGEX_VERSION,
2031 _SC_SHELL,
2032 _SC_SIGNALS,
2033 _SC_SPAWN,
2034 _SC_SPORADIC_SERVER,
2035 _SC_THREAD_SPORADIC_SERVER,
2036 _SC_SYSTEM_DATABASE,
2037 _SC_SYSTEM_DATABASE_R,
2038 _SC_TIMEOUTS,
2039 _SC_TYPED_MEMORY_OBJECTS,
2040 _SC_USER_GROUPS,
2041 _SC_USER_GROUPS_R,
2042 _SC_2_PBS,
2043 _SC_2_PBS_ACCOUNTING,
2044 _SC_2_PBS_LOCATE,
2045 _SC_2_PBS_MESSAGE,
2046 _SC_2_PBS_TRACK,
2047 _SC_SYMLOOP_MAX,
2048 _SC_STREAMS,
2049 _SC_2_PBS_CHECKPOINT,
2050 _SC_V6_ILP32_OFF32,
2051 _SC_V6_ILP32_OFFBIG,
2052 _SC_V6_LP64_OFF64,
2053 _SC_V6_LPBIG_OFFBIG,
2054 _SC_HOST_NAME_MAX,
2055 _SC_TRACE,
2056 _SC_TRACE_EVENT_FILTER,
2057 _SC_TRACE_INHERIT,
2058 _SC_TRACE_LOG,
2059 _SC_LEVEL1_ICACHE_SIZE,
2060 _SC_LEVEL1_ICACHE_ASSOC,
2061 _SC_LEVEL1_ICACHE_LINESIZE,
2062 _SC_LEVEL1_DCACHE_SIZE,
2063 _SC_LEVEL1_DCACHE_ASSOC,
2064 _SC_LEVEL1_DCACHE_LINESIZE,
2065 _SC_LEVEL2_CACHE_SIZE,
2066 _SC_LEVEL2_CACHE_ASSOC,
2067 _SC_LEVEL2_CACHE_LINESIZE,
2068 _SC_LEVEL3_CACHE_SIZE,
2069 _SC_LEVEL3_CACHE_ASSOC,
2070 _SC_LEVEL3_CACHE_LINESIZE,
2071 _SC_LEVEL4_CACHE_SIZE,
2072 _SC_LEVEL4_CACHE_ASSOC,
2073 _SC_LEVEL4_CACHE_LINESIZE,
2074 _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
2075 _SC_RAW_SOCKETS,
2076 _SC_V7_ILP32_OFF32,
2077 _SC_V7_ILP32_OFFBIG,
2078 _SC_V7_LP64_OFF64,
2079 _SC_V7_LPBIG_OFFBIG,
2080 _SC_SS_REPL_MAX,
2081 _SC_TRACE_EVENT_NAME_MAX,
2082 _SC_TRACE_NAME_MAX,
2083 _SC_TRACE_SYS_MAX,
2084 _SC_TRACE_USER_EVENT_MAX,
2085 _SC_XOPEN_STREAMS,
2086 _SC_THREAD_ROBUST_PRIO_INHERIT,
2087 _SC_THREAD_ROBUST_PRIO_PROTECT
2088 };
2089enum
2090 {
2091 _CS_PATH,
2092 _CS_V6_WIDTH_RESTRICTED_ENVS,
2093 _CS_GNU_LIBC_VERSION,
2094 _CS_GNU_LIBPTHREAD_VERSION,
2095 _CS_V5_WIDTH_RESTRICTED_ENVS,
2096 _CS_V7_WIDTH_RESTRICTED_ENVS,
2097 _CS_LFS_CFLAGS = 1000,
2098 _CS_LFS_LDFLAGS,
2099 _CS_LFS_LIBS,
2100 _CS_LFS_LINTFLAGS,
2101 _CS_LFS64_CFLAGS,
2102 _CS_LFS64_LDFLAGS,
2103 _CS_LFS64_LIBS,
2104 _CS_LFS64_LINTFLAGS,
2105 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
2106 _CS_XBS5_ILP32_OFF32_LDFLAGS,
2107 _CS_XBS5_ILP32_OFF32_LIBS,
2108 _CS_XBS5_ILP32_OFF32_LINTFLAGS,
2109 _CS_XBS5_ILP32_OFFBIG_CFLAGS,
2110 _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
2111 _CS_XBS5_ILP32_OFFBIG_LIBS,
2112 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
2113 _CS_XBS5_LP64_OFF64_CFLAGS,
2114 _CS_XBS5_LP64_OFF64_LDFLAGS,
2115 _CS_XBS5_LP64_OFF64_LIBS,
2116 _CS_XBS5_LP64_OFF64_LINTFLAGS,
2117 _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
2118 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
2119 _CS_XBS5_LPBIG_OFFBIG_LIBS,
2120 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
2121 _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
2122 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
2123 _CS_POSIX_V6_ILP32_OFF32_LIBS,
2124 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
2125 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
2126 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
2127 _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
2128 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
2129 _CS_POSIX_V6_LP64_OFF64_CFLAGS,
2130 _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
2131 _CS_POSIX_V6_LP64_OFF64_LIBS,
2132 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
2133 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
2134 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
2135 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
2136 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
2137 _CS_POSIX_V7_ILP32_OFF32_CFLAGS,
2138 _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
2139 _CS_POSIX_V7_ILP32_OFF32_LIBS,
2140 _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
2141 _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
2142 _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
2143 _CS_POSIX_V7_ILP32_OFFBIG_LIBS,
2144 _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
2145 _CS_POSIX_V7_LP64_OFF64_CFLAGS,
2146 _CS_POSIX_V7_LP64_OFF64_LDFLAGS,
2147 _CS_POSIX_V7_LP64_OFF64_LIBS,
2148 _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
2149 _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
2150 _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
2151 _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
2152 _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
2153 _CS_V6_ENV,
2154 _CS_V7_ENV
2155 };
2156extern long int pathconf (const char *__path, int __name)
2157 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2158extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__));
2159extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__));
2160extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__))
2161 __attribute__ ((__access__ (__write_only__, 2, 3)));
2162extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__));
2163extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__));
2164extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
2165extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
2166extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
2167extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__));
2168extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
2169extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__));
2170extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
2171extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__));
2172extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__));
2173extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__));
2174extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__));
2175extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
2176 __attribute__ ((__access__ (__write_only__, 2, 1)));
2177extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__));
2178extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2179extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2180extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2181extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2182extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2183extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2184extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
2185 __attribute__ ((__nothrow__ , __leaf__));
2186extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
2187 __attribute__ ((__nothrow__ , __leaf__));
2188extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
2189 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2190extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
2191 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2192extern __pid_t fork (void) __attribute__ ((__nothrow__));
2193extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__));
2194extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2195extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
2196 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2197extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2198extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__));
2199extern int link (const char *__from, const char *__to)
2200 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2201extern int linkat (int __fromfd, const char *__from, int __tofd,
2202 const char *__to, int __flags)
2203 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__));
2204extern int symlink (const char *__from, const char *__to)
2205 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2206extern ssize_t readlink (const char *__restrict __path,
2207 char *__restrict __buf, size_t __len)
2208 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2209extern int symlinkat (const char *__from, int __tofd,
2210 const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
2211extern ssize_t readlinkat (int __fd, const char *__restrict __path,
2212 char *__restrict __buf, size_t __len)
2213 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3, 4)));
2214extern int unlink (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2215extern int unlinkat (int __fd, const char *__name, int __flag)
2216 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2217extern int rmdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2218extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2219extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__));
2220extern char *getlogin (void);
2221extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)))
2222 __attribute__ ((__access__ (__write_only__, 1, 2)));
2223extern int setlogin (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2224
2225extern char *optarg;
2226extern int optind;
2227extern int opterr;
2228extern int optopt;
2229extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
2230 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
2231
2232
2233
2234extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
2235 __attribute__ ((__access__ (__write_only__, 1, 2)));
2236extern int sethostname (const char *__name, size_t __len)
2237 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 1, 2)));
2238extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2239extern int getdomainname (char *__name, size_t __len)
2240 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
2241extern int setdomainname (const char *__name, size_t __len)
2242 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 1, 2)));
2243extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__));
2244extern int revoke (const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2245extern int profil (unsigned short int *__sample_buffer, size_t __size,
2246 size_t __offset, unsigned int __scale)
2247 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2248extern int acct (const char *__name) __attribute__ ((__nothrow__ , __leaf__));
2249extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__));
2250extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__));
2251extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__));
2252extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2253extern int chroot (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2254extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));
2255extern int fsync (int __fd);
2256extern int syncfs (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2257extern long int gethostid (void);
2258extern void sync (void) __attribute__ ((__nothrow__ , __leaf__));
2259extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2260extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__));
2261extern int truncate (const char *__file, __off_t __length)
2262 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2263extern int truncate64 (const char *__file, __off64_t __length)
2264 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2265extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2266extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2267extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2268extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__));
2269extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__));
2270extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__));
2271extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__));
2272ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
2273 int __outfd, __off64_t *__poutoff,
2274 size_t __length, unsigned int __flags);
2275extern int fdatasync (int __fildes);
2276extern char *crypt (const char *__key, const char *__salt)
2277 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2278extern void swab (const void *__restrict __from, void *__restrict __to,
2279 ssize_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)))
2280 __attribute__ ((__access__ (__read_only__, 1, 3)))
2281 __attribute__ ((__access__ (__write_only__, 2, 3)));
2282int getentropy (void *__buffer, size_t __length) __attribute__ ((__warn_unused_result__))
2283 __attribute__ ((__access__ (__write_only__, 1, 2)));
2284extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,
2285 size_t __buflen)
2286 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2287extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read")
2288 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2289extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk")
2290 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer")));
2291extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
2292read (int __fd, void *__buf, size_t __nbytes)
2293{
2294 if (__builtin_object_size (__buf, 0) != (size_t) -1)
2295 {
2296 if (!__builtin_constant_p (__nbytes))
2297 return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0));
2298 if (__nbytes > __builtin_object_size (__buf, 0))
2299 return __read_chk_warn (__fd, __buf, __nbytes,
2300 __builtin_object_size (__buf, 0));
2301 }
2302 return __read_alias (__fd, __buf, __nbytes);
2303}
2304extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,
2305 __off_t __offset, size_t __bufsize)
2306 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2307extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,
2308 __off64_t __offset, size_t __bufsize)
2309 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2310extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread")
2311 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2312extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64")
2313 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2314extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk")
2315 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer")));
2316extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk")
2317 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer")));
2318extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
2319pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
2320{
2321 if (__builtin_object_size (__buf, 0) != (size_t) -1)
2322 {
2323 if (!__builtin_constant_p (__nbytes))
2324 return __pread_chk (__fd, __buf, __nbytes, __offset,
2325 __builtin_object_size (__buf, 0));
2326 if ( __nbytes > __builtin_object_size (__buf, 0))
2327 return __pread_chk_warn (__fd, __buf, __nbytes, __offset,
2328 __builtin_object_size (__buf, 0));
2329 }
2330 return __pread_alias (__fd, __buf, __nbytes, __offset);
2331}
2332extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
2333pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
2334{
2335 if (__builtin_object_size (__buf, 0) != (size_t) -1)
2336 {
2337 if (!__builtin_constant_p (__nbytes))
2338 return __pread64_chk (__fd, __buf, __nbytes, __offset,
2339 __builtin_object_size (__buf, 0));
2340 if ( __nbytes > __builtin_object_size (__buf, 0))
2341 return __pread64_chk_warn (__fd, __buf, __nbytes, __offset,
2342 __builtin_object_size (__buf, 0));
2343 }
2344 return __pread64_alias (__fd, __buf, __nbytes, __offset);
2345}
2346extern ssize_t __readlink_chk (const char *__restrict __path,
2347 char *__restrict __buf, size_t __len,
2348 size_t __buflen)
2349 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2350extern ssize_t __readlink_alias (const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__ , __leaf__))
2351 __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2352extern ssize_t __readlink_chk_warn (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__ , __leaf__))
2353 __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer")));
2354extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t
2355__attribute__ ((__nothrow__ , __leaf__)) readlink (const char *__restrict __path, char *__restrict __buf, size_t __len)
2356{
2357 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2358 {
2359 if (!__builtin_constant_p (__len))
2360 return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
2361 if ( __len > __builtin_object_size (__buf, 2 > 1))
2362 return __readlink_chk_warn (__path, __buf, __len,
2363 __builtin_object_size (__buf, 2 > 1));
2364 }
2365 return __readlink_alias (__path, __buf, __len);
2366}
2367extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path,
2368 char *__restrict __buf, size_t __len,
2369 size_t __buflen)
2370 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3, 4)));
2371extern ssize_t __readlinkat_alias (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__ , __leaf__))
2372 __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3, 4)));
2373extern ssize_t __readlinkat_chk_warn (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__ , __leaf__))
2374 __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer")));
2375extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t
2376__attribute__ ((__nothrow__ , __leaf__)) readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len)
2377{
2378 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2379 {
2380 if (!__builtin_constant_p (__len))
2381 return __readlinkat_chk (__fd, __path, __buf, __len,
2382 __builtin_object_size (__buf, 2 > 1));
2383 if (__len > __builtin_object_size (__buf, 2 > 1))
2384 return __readlinkat_chk_warn (__fd, __path, __buf, __len,
2385 __builtin_object_size (__buf, 2 > 1));
2386 }
2387 return __readlinkat_alias (__fd, __path, __buf, __len);
2388}
2389extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
2390 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
2391extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__ , __leaf__))
2392 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
2393extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__ , __leaf__))
2394 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer")));
2395extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
2396__attribute__ ((__nothrow__ , __leaf__)) getcwd (char *__buf, size_t __size)
2397{
2398 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2399 {
2400 if (!__builtin_constant_p (__size))
2401 return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1));
2402 if (__size > __builtin_object_size (__buf, 2 > 1))
2403 return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1));
2404 }
2405 return __getcwd_alias (__buf, __size);
2406}
2407extern char *__getwd_chk (char *__buf, size_t buflen)
2408 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
2409extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__ , __leaf__))
2410 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size")));
2411extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char *
2412__attribute__ ((__nothrow__ , __leaf__)) getwd (char *__buf)
2413{
2414 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2415 return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1));
2416 return __getwd_warn (__buf);
2417}
2418extern size_t __confstr_chk (int __name, char *__buf, size_t __len,
2419 size_t __buflen) __attribute__ ((__nothrow__ , __leaf__))
2420 __attribute__ ((__access__ (__write_only__, 2, 3)));
2421extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__ , __leaf__))
2422 __attribute__ ((__access__ (__write_only__, 2, 3)));
2423extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__ , __leaf__))
2424 __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer")));
2425extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
2426__attribute__ ((__nothrow__ , __leaf__)) confstr (int __name, char *__buf, size_t __len)
2427{
2428 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2429 {
2430 if (!__builtin_constant_p (__len))
2431 return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1));
2432 if (__builtin_object_size (__buf, 2 > 1) < __len)
2433 return __confstr_chk_warn (__name, __buf, __len,
2434 __builtin_object_size (__buf, 2 > 1));
2435 }
2436 return __confstr_alias (__name, __buf, __len);
2437}
2438extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen)
2439 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 1)));
2440extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 1)));
2441extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__ , __leaf__))
2442 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer")));
2443extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2444__attribute__ ((__nothrow__ , __leaf__)) getgroups (int __size, __gid_t __list[])
2445{
2446 if (__builtin_object_size (__list, 2 > 1) != (size_t) -1)
2447 {
2448 if (!__builtin_constant_p (__size) || __size < 0)
2449 return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1));
2450 if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1))
2451 return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1));
2452 }
2453 return __getgroups_alias (__size, __list);
2454}
2455extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen,
2456 size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)))
2457 __attribute__ ((__access__ (__write_only__, 2, 3)));
2458extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__ , __leaf__))
2459 __attribute__ ((__nonnull__ (2)));
2460extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
2461 __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer")));
2462extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2463__attribute__ ((__nothrow__ , __leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen)
2464{
2465 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2466 {
2467 if (!__builtin_constant_p (__buflen))
2468 return __ttyname_r_chk (__fd, __buf, __buflen,
2469 __builtin_object_size (__buf, 2 > 1));
2470 if (__buflen > __builtin_object_size (__buf, 2 > 1))
2471 return __ttyname_r_chk_warn (__fd, __buf, __buflen,
2472 __builtin_object_size (__buf, 2 > 1));
2473 }
2474 return __ttyname_r_alias (__fd, __buf, __buflen);
2475}
2476extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)
2477 __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
2478extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") __attribute__ ((__nonnull__ (1)));
2479extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk")
2480 __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer")));
2481extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2482getlogin_r (char *__buf, size_t __buflen)
2483{
2484 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2485 {
2486 if (!__builtin_constant_p (__buflen))
2487 return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2488 if (__buflen > __builtin_object_size (__buf, 2 > 1))
2489 return __getlogin_r_chk_warn (__buf, __buflen,
2490 __builtin_object_size (__buf, 2 > 1));
2491 }
2492 return __getlogin_r_alias (__buf, __buflen);
2493}
2494extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal)
2495 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
2496extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__ , __leaf__))
2497 __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
2498extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__ , __leaf__))
2499 __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer")));
2500extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2501__attribute__ ((__nothrow__ , __leaf__)) gethostname (char *__buf, size_t __buflen)
2502{
2503 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2504 {
2505 if (!__builtin_constant_p (__buflen))
2506 return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2507 if (__buflen > __builtin_object_size (__buf, 2 > 1))
2508 return __gethostname_chk_warn (__buf, __buflen,
2509 __builtin_object_size (__buf, 2 > 1));
2510 }
2511 return __gethostname_alias (__buf, __buflen);
2512}
2513extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal)
2514 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
2515extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
2516 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
2517extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__ , __leaf__))
2518 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer")));
2519extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2520__attribute__ ((__nothrow__ , __leaf__)) getdomainname (char *__buf, size_t __buflen)
2521{
2522 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2523 {
2524 if (!__builtin_constant_p (__buflen))
2525 return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2526 if (__buflen > __builtin_object_size (__buf, 2 > 1))
2527 return __getdomainname_chk_warn (__buf, __buflen,
2528 __builtin_object_size (__buf, 2 > 1));
2529 }
2530 return __getdomainname_alias (__buf, __buflen);
2531}
2532extern __pid_t gettid (void) __attribute__ ((__nothrow__ , __leaf__));
2533
2534
2535
2536[[nodiscard]]
2537__attribute__((__malloc__))
2538__attribute__((__returns_nonnull__))
2539__attribute__((__alloc_size__ (1)))
2540void *ruby_xmalloc(size_t size)
2541
2542;
2543[[nodiscard]]
2544__attribute__((__malloc__))
2545__attribute__((__returns_nonnull__))
2546__attribute__((__alloc_size__ (1,2)))
2547void *ruby_xmalloc2(size_t nelems, size_t elemsiz)
2548
2549;
2550[[nodiscard]]
2551__attribute__((__malloc__))
2552__attribute__((__returns_nonnull__))
2553__attribute__((__alloc_size__ (1,2)))
2554void *ruby_xcalloc(size_t nelems, size_t elemsiz)
2555
2556;
2557[[nodiscard]]
2558__attribute__((__returns_nonnull__))
2559__attribute__((__alloc_size__ (2)))
2560void *ruby_xrealloc(void *ptr, size_t newsiz)
2561
2562;
2563[[nodiscard]]
2564__attribute__((__returns_nonnull__))
2565__attribute__((__alloc_size__ (2,3)))
2566void *ruby_xrealloc2(void *ptr, size_t newelems, size_t newsiz)
2567
2568;
2569void ruby_xfree(void *ptr)
2570
2571;
2572
2573
2574#define RBIMPL_ATTR_COLD_H
2575#define RBIMPL_ATTR_COLD() __attribute__((__cold__))
2576
2577
2578__attribute__((__noreturn__))
2579__attribute__((__cold__))
2580void rb_assert_failure(const char *file, int line, const char *name, const char *expr);
2581
2582
2583#define COLDFUNC RBIMPL_ATTR_COLD()
2584
2585typedef float float_t;
2586typedef double double_t;
2587enum
2588 {
2589 FP_INT_UPWARD =
2590 0,
2591 FP_INT_DOWNWARD =
2592 1,
2593 FP_INT_TOWARDZERO =
2594 2,
2595 FP_INT_TONEARESTFROMZERO =
2596 3,
2597 FP_INT_TONEAREST =
2598 4,
2599 };
2600extern int __fpclassify (double __value) __attribute__ ((__nothrow__ , __leaf__))
2601 __attribute__ ((__const__));
2602extern int __signbit (double __value) __attribute__ ((__nothrow__ , __leaf__))
2603 __attribute__ ((__const__));
2604extern int __isinf (double __value) __attribute__ ((__nothrow__ , __leaf__))
2605 __attribute__ ((__const__));
2606extern int __finite (double __value) __attribute__ ((__nothrow__ , __leaf__))
2607 __attribute__ ((__const__));
2608extern int __isnan (double __value) __attribute__ ((__nothrow__ , __leaf__))
2609 __attribute__ ((__const__));
2610extern int __iseqsig (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2611extern int __issignaling (double __value) __attribute__ ((__nothrow__ , __leaf__))
2612 __attribute__ ((__const__));
2613extern double acos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acos (double __x) __attribute__ ((__nothrow__ , __leaf__));
2614extern double asin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asin (double __x) __attribute__ ((__nothrow__ , __leaf__));
2615extern double atan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan (double __x) __attribute__ ((__nothrow__ , __leaf__));
2616extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__));
2617 extern double cos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cos (double __x) __attribute__ ((__nothrow__ , __leaf__));
2618 extern double sin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sin (double __x) __attribute__ ((__nothrow__ , __leaf__));
2619extern double tan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tan (double __x) __attribute__ ((__nothrow__ , __leaf__));
2620extern double cosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cosh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2621extern double sinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sinh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2622extern double tanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tanh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2623 extern void sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2624extern double acosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acosh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2625extern double asinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asinh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2626extern double atanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atanh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2627 extern double exp (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp (double __x) __attribute__ ((__nothrow__ , __leaf__));
2628extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2629extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2630 extern double log (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log (double __x) __attribute__ ((__nothrow__ , __leaf__));
2631extern double log10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log10 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2632extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2633extern double exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2634extern double expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2635extern double log1p (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log1p (double __x) __attribute__ ((__nothrow__ , __leaf__));
2636extern double logb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __logb (double __x) __attribute__ ((__nothrow__ , __leaf__));
2637extern double exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2638extern double log2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log2 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2639 extern double pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2640extern double sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__));
2641extern double hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2642extern double cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__));
2643extern double ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2644extern double fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2645extern double floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2646extern double fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2647extern int isinf (double __value) __attribute__ ((__nothrow__ , __leaf__))
2648 __attribute__ ((__const__));
2649extern int finite (double __value) __attribute__ ((__nothrow__ , __leaf__))
2650 __attribute__ ((__const__));
2651extern double drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2652extern double significand (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __significand (double __x) __attribute__ ((__nothrow__ , __leaf__));
2653extern double copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2654extern double nan (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern double __nan (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2655extern int isnan (double __value) __attribute__ ((__nothrow__ , __leaf__))
2656 __attribute__ ((__const__));
2657extern double j0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j0 (double) __attribute__ ((__nothrow__ , __leaf__));
2658extern double j1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j1 (double) __attribute__ ((__nothrow__ , __leaf__));
2659extern double jn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __jn (int, double) __attribute__ ((__nothrow__ , __leaf__));
2660extern double y0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y0 (double) __attribute__ ((__nothrow__ , __leaf__));
2661extern double y1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y1 (double) __attribute__ ((__nothrow__ , __leaf__));
2662extern double yn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __yn (int, double) __attribute__ ((__nothrow__ , __leaf__));
2663extern double erf (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erf (double) __attribute__ ((__nothrow__ , __leaf__));
2664extern double erfc (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erfc (double) __attribute__ ((__nothrow__ , __leaf__));
2665extern double lgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma (double) __attribute__ ((__nothrow__ , __leaf__));
2666extern double tgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __tgamma (double) __attribute__ ((__nothrow__ , __leaf__));
2667extern double gamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __gamma (double) __attribute__ ((__nothrow__ , __leaf__));
2668extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2669extern double rint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __rint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2670extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2671extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2672extern double nextdown (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextdown (double __x) __attribute__ ((__nothrow__ , __leaf__));
2673extern double nextup (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextup (double __x) __attribute__ ((__nothrow__ , __leaf__));
2674extern double remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2675extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2676extern int ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__));
2677extern long int llogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogb (double __x) __attribute__ ((__nothrow__ , __leaf__));
2678extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2679extern double nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2680extern double round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2681extern double trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2682extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2683extern long int lrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2684__extension__
2685extern long long int llrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2686extern long int lround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lround (double __x) __attribute__ ((__nothrow__ , __leaf__));
2687__extension__
2688extern long long int llround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__ , __leaf__));
2689extern double fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2690extern double fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2691extern double fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2692extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__));
2693extern double roundeven (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __roundeven (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2694extern __intmax_t fromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2695extern __uintmax_t ufromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2696extern __intmax_t fromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2697extern __uintmax_t ufromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2698extern double fmaxmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmaxmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2699extern double fminmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fminmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2700extern int canonicalize (double *__cx, const double *__x) __attribute__ ((__nothrow__ , __leaf__));
2701extern int totalorder (const double *__x, const double *__y) __attribute__ ((__nothrow__ , __leaf__))
2702 __attribute__ ((__pure__));
2703extern int totalordermag (const double *__x, const double *__y) __attribute__ ((__nothrow__ , __leaf__))
2704 __attribute__ ((__pure__));
2705extern double getpayload (const double *__x) __attribute__ ((__nothrow__ , __leaf__)); extern double __getpayload (const double *__x) __attribute__ ((__nothrow__ , __leaf__));
2706extern int setpayload (double *__x, double __payload) __attribute__ ((__nothrow__ , __leaf__));
2707extern int setpayloadsig (double *__x, double __payload) __attribute__ ((__nothrow__ , __leaf__));
2708extern double scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__));
2709extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2710 __attribute__ ((__const__));
2711extern int __signbitf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2712 __attribute__ ((__const__));
2713extern int __isinff (float __value) __attribute__ ((__nothrow__ , __leaf__))
2714 __attribute__ ((__const__));
2715extern int __finitef (float __value) __attribute__ ((__nothrow__ , __leaf__))
2716 __attribute__ ((__const__));
2717extern int __isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2718 __attribute__ ((__const__));
2719extern int __iseqsigf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2720extern int __issignalingf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2721 __attribute__ ((__const__));
2722extern float acosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acosf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2723extern float asinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2724extern float atanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2725extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__));
2726 extern float cosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cosf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2727 extern float sinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2728extern float tanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2729extern float coshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __coshf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2730extern float sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2731extern float tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2732 extern void sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2733extern float acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2734extern float asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2735extern float atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2736 extern float expf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2737extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2738extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2739 extern float logf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2740extern float log10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log10f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2741extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2742extern float exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2743extern float expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2744extern float log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2745extern float logbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logbf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2746extern float exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2747extern float log2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log2f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2748 extern float powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2749extern float sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2750extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2751extern float cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2752extern float ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2753extern float fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2754extern float floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2755extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2756extern int isinff (float __value) __attribute__ ((__nothrow__ , __leaf__))
2757 __attribute__ ((__const__));
2758extern int finitef (float __value) __attribute__ ((__nothrow__ , __leaf__))
2759 __attribute__ ((__const__));
2760extern float dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2761extern float significandf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __significandf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2762extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2763extern float nanf (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern float __nanf (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2764extern int isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2765 __attribute__ ((__const__));
2766extern float j0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j0f (float) __attribute__ ((__nothrow__ , __leaf__));
2767extern float j1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j1f (float) __attribute__ ((__nothrow__ , __leaf__));
2768extern float jnf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __jnf (int, float) __attribute__ ((__nothrow__ , __leaf__));
2769extern float y0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y0f (float) __attribute__ ((__nothrow__ , __leaf__));
2770extern float y1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y1f (float) __attribute__ ((__nothrow__ , __leaf__));
2771extern float ynf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __ynf (int, float) __attribute__ ((__nothrow__ , __leaf__));
2772extern float erff (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erff (float) __attribute__ ((__nothrow__ , __leaf__));
2773extern float erfcf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erfcf (float) __attribute__ ((__nothrow__ , __leaf__));
2774extern float lgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf (float) __attribute__ ((__nothrow__ , __leaf__));
2775extern float tgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __tgammaf (float) __attribute__ ((__nothrow__ , __leaf__));
2776extern float gammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __gammaf (float) __attribute__ ((__nothrow__ , __leaf__));
2777extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2778extern float rintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __rintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2779extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2780extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2781extern float nextdownf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextdownf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2782extern float nextupf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextupf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2783extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2784extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2785extern int ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2786extern long int llogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2787extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2788extern float nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2789extern float roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2790extern float truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2791extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2792extern long int lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2793__extension__
2794extern long long int llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2795extern long int lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2796__extension__
2797extern long long int llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2798extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2799extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2800extern float fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2801extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__));
2802extern float roundevenf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __roundevenf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2803extern __intmax_t fromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2804extern __uintmax_t ufromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2805extern __intmax_t fromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2806extern __uintmax_t ufromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2807extern float fmaxmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaxmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2808extern float fminmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2809extern int canonicalizef (float *__cx, const float *__x) __attribute__ ((__nothrow__ , __leaf__));
2810extern int totalorderf (const float *__x, const float *__y) __attribute__ ((__nothrow__ , __leaf__))
2811 __attribute__ ((__pure__));
2812extern int totalordermagf (const float *__x, const float *__y) __attribute__ ((__nothrow__ , __leaf__))
2813 __attribute__ ((__pure__));
2814extern float getpayloadf (const float *__x) __attribute__ ((__nothrow__ , __leaf__)); extern float __getpayloadf (const float *__x) __attribute__ ((__nothrow__ , __leaf__));
2815extern int setpayloadf (float *__x, float __payload) __attribute__ ((__nothrow__ , __leaf__));
2816extern int setpayloadsigf (float *__x, float __payload) __attribute__ ((__nothrow__ , __leaf__));
2817extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__));
2818extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2819 __attribute__ ((__const__));
2820extern int __signbitl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2821 __attribute__ ((__const__));
2822extern int __isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2823 __attribute__ ((__const__));
2824extern int __finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2825 __attribute__ ((__const__));
2826extern int __isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2827 __attribute__ ((__const__));
2828extern int __iseqsigl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2829extern int __issignalingl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2830 __attribute__ ((__const__));
2831extern long double acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2832extern long double asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2833extern long double atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2834extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__));
2835 extern long double cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2836 extern long double sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2837extern long double tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2838extern long double coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2839extern long double sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2840extern long double tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2841 extern void sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2842extern long double acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2843extern long double asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2844extern long double atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2845 extern long double expl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2846extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2847extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2848 extern long double logl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2849extern long double log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2850extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2851extern long double exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2852extern long double expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2853extern long double log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2854extern long double logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2855extern long double exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2856extern long double log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2857 extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2858extern long double sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2859extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2860extern long double cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2861extern long double ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2862extern long double fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2863extern long double floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2864extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2865extern int isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2866 __attribute__ ((__const__));
2867extern int finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2868 __attribute__ ((__const__));
2869extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2870extern long double significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2871extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2872extern long double nanl (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nanl (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2873extern int isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2874 __attribute__ ((__const__));
2875extern long double j0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j0l (long double) __attribute__ ((__nothrow__ , __leaf__));
2876extern long double j1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j1l (long double) __attribute__ ((__nothrow__ , __leaf__));
2877extern long double jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__));
2878extern long double y0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y0l (long double) __attribute__ ((__nothrow__ , __leaf__));
2879extern long double y1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y1l (long double) __attribute__ ((__nothrow__ , __leaf__));
2880extern long double ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__));
2881extern long double erfl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfl (long double) __attribute__ ((__nothrow__ , __leaf__));
2882extern long double erfcl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__ , __leaf__));
2883extern long double lgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__ , __leaf__));
2884extern long double tgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tgammal (long double) __attribute__ ((__nothrow__ , __leaf__));
2885extern long double gammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __gammal (long double) __attribute__ ((__nothrow__ , __leaf__));
2886extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2887extern long double rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2888extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2889extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2890extern long double nextdownl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextdownl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2891extern long double nextupl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextupl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2892extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2893extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2894extern int ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2895extern long int llogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2896extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2897extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2898extern long double roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2899extern long double truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2900extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2901extern long int lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2902__extension__
2903extern long long int llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2904extern long int lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2905__extension__
2906extern long long int llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2907extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2908extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2909extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2910extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__));
2911extern long double roundevenl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __roundevenl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2912extern __intmax_t fromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2913extern __uintmax_t ufromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2914extern __intmax_t fromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2915extern __uintmax_t ufromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2916extern long double fmaxmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaxmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2917extern long double fminmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2918extern int canonicalizel (long double *__cx, const long double *__x) __attribute__ ((__nothrow__ , __leaf__));
2919extern int totalorderl (const long double *__x, const long double *__y) __attribute__ ((__nothrow__ , __leaf__))
2920 __attribute__ ((__pure__));
2921extern int totalordermagl (const long double *__x, const long double *__y) __attribute__ ((__nothrow__ , __leaf__))
2922 __attribute__ ((__pure__));
2923extern long double getpayloadl (const long double *__x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __getpayloadl (const long double *__x) __attribute__ ((__nothrow__ , __leaf__));
2924extern int setpayloadl (long double *__x, long double __payload) __attribute__ ((__nothrow__ , __leaf__));
2925extern int setpayloadsigl (long double *__x, long double __payload) __attribute__ ((__nothrow__ , __leaf__));
2926extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__));
2927extern _Float32 acosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __acosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2928extern _Float32 asinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __asinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2929extern _Float32 atanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __atanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2930extern _Float32 atan2f32 (_Float32 __y, _Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __atan2f32 (_Float32 __y, _Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2931 extern _Float32 cosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __cosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2932 extern _Float32 sinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __sinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2933extern _Float32 tanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __tanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2934extern _Float32 coshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __coshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2935extern _Float32 sinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __sinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2936extern _Float32 tanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __tanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2937 extern void sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2938extern _Float32 acoshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __acoshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2939extern _Float32 asinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __asinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2940extern _Float32 atanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __atanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2941 extern _Float32 expf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __expf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2942extern _Float32 frexpf32 (_Float32 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __frexpf32 (_Float32 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2943extern _Float32 ldexpf32 (_Float32 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __ldexpf32 (_Float32 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2944 extern _Float32 logf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __logf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2945extern _Float32 log10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __log10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2946extern _Float32 modff32 (_Float32 __x, _Float32 *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __modff32 (_Float32 __x, _Float32 *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2947extern _Float32 exp10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __exp10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2948extern _Float32 expm1f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __expm1f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2949extern _Float32 log1pf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __log1pf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2950extern _Float32 logbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __logbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2951extern _Float32 exp2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __exp2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2952extern _Float32 log2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __log2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2953 extern _Float32 powf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __powf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2954extern _Float32 sqrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __sqrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2955extern _Float32 hypotf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __hypotf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2956extern _Float32 cbrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __cbrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2957extern _Float32 ceilf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __ceilf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2958extern _Float32 fabsf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fabsf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2959extern _Float32 floorf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __floorf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2960extern _Float32 fmodf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __fmodf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2961extern _Float32 copysignf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __copysignf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2962extern _Float32 nanf32 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nanf32 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2963extern _Float32 j0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __j0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2964extern _Float32 j1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __j1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2965extern _Float32 jnf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __jnf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__));
2966extern _Float32 y0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __y0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2967extern _Float32 y1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __y1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2968extern _Float32 ynf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __ynf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__));
2969extern _Float32 erff32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __erff32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2970extern _Float32 erfcf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __erfcf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2971extern _Float32 lgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __lgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2972extern _Float32 tgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __tgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2973extern _Float32 lgammaf32_r (_Float32, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __lgammaf32_r (_Float32, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2974extern _Float32 rintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __rintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2975extern _Float32 nextafterf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nextafterf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2976extern _Float32 nextdownf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nextdownf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2977extern _Float32 nextupf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nextupf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2978extern _Float32 remainderf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __remainderf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2979extern _Float32 scalbnf32 (_Float32 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __scalbnf32 (_Float32 __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2980extern int ilogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2981extern long int llogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2982extern _Float32 scalblnf32 (_Float32 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __scalblnf32 (_Float32 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2983extern _Float32 nearbyintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nearbyintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2984extern _Float32 roundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __roundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2985extern _Float32 truncf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __truncf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2986extern _Float32 remquof32 (_Float32 __x, _Float32 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __remquof32 (_Float32 __x, _Float32 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2987extern long int lrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2988__extension__
2989extern long long int llrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2990extern long int lroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2991__extension__
2992extern long long int llroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2993extern _Float32 fdimf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __fdimf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2994extern _Float32 fmaxf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fmaxf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2995extern _Float32 fminf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fminf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2996extern _Float32 fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) __attribute__ ((__nothrow__ , __leaf__));
2997extern _Float32 roundevenf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __roundevenf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2998extern __intmax_t fromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2999extern __uintmax_t ufromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3000extern __intmax_t fromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3001extern __uintmax_t ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3002extern _Float32 fmaxmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fmaxmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3003extern _Float32 fminmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fminmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3004extern int canonicalizef32 (_Float32 *__cx, const _Float32 *__x) __attribute__ ((__nothrow__ , __leaf__));
3005extern int totalorderf32 (const _Float32 *__x, const _Float32 *__y) __attribute__ ((__nothrow__ , __leaf__))
3006 __attribute__ ((__pure__));
3007extern int totalordermagf32 (const _Float32 *__x, const _Float32 *__y) __attribute__ ((__nothrow__ , __leaf__))
3008 __attribute__ ((__pure__));
3009extern _Float32 getpayloadf32 (const _Float32 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __getpayloadf32 (const _Float32 *__x) __attribute__ ((__nothrow__ , __leaf__));
3010extern int setpayloadf32 (_Float32 *__x, _Float32 __payload) __attribute__ ((__nothrow__ , __leaf__));
3011extern int setpayloadsigf32 (_Float32 *__x, _Float32 __payload) __attribute__ ((__nothrow__ , __leaf__));
3012extern _Float64 acosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __acosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3013extern _Float64 asinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __asinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3014extern _Float64 atanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __atanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3015extern _Float64 atan2f64 (_Float64 __y, _Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __atan2f64 (_Float64 __y, _Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3016 extern _Float64 cosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __cosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3017 extern _Float64 sinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __sinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3018extern _Float64 tanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __tanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3019extern _Float64 coshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __coshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3020extern _Float64 sinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __sinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3021extern _Float64 tanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __tanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3022 extern void sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) __attribute__ ((__nothrow__ , __leaf__));
3023extern _Float64 acoshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __acoshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3024extern _Float64 asinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __asinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3025extern _Float64 atanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __atanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3026 extern _Float64 expf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __expf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3027extern _Float64 frexpf64 (_Float64 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __frexpf64 (_Float64 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
3028extern _Float64 ldexpf64 (_Float64 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __ldexpf64 (_Float64 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
3029 extern _Float64 logf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __logf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3030extern _Float64 log10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __log10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3031extern _Float64 modff64 (_Float64 __x, _Float64 *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __modff64 (_Float64 __x, _Float64 *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3032extern _Float64 exp10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __exp10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3033extern _Float64 expm1f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __expm1f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3034extern _Float64 log1pf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __log1pf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3035extern _Float64 logbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __logbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3036extern _Float64 exp2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __exp2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3037extern _Float64 log2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __log2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3038 extern _Float64 powf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __powf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3039extern _Float64 sqrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __sqrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3040extern _Float64 hypotf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __hypotf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3041extern _Float64 cbrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __cbrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3042extern _Float64 ceilf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __ceilf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3043extern _Float64 fabsf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fabsf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3044extern _Float64 floorf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __floorf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3045extern _Float64 fmodf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __fmodf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3046extern _Float64 copysignf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __copysignf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3047extern _Float64 nanf64 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nanf64 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3048extern _Float64 j0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __j0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3049extern _Float64 j1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __j1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3050extern _Float64 jnf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __jnf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__));
3051extern _Float64 y0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __y0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3052extern _Float64 y1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __y1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3053extern _Float64 ynf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __ynf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__));
3054extern _Float64 erff64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __erff64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3055extern _Float64 erfcf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __erfcf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3056extern _Float64 lgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __lgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3057extern _Float64 tgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __tgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3058extern _Float64 lgammaf64_r (_Float64, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __lgammaf64_r (_Float64, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3059extern _Float64 rintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __rintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3060extern _Float64 nextafterf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nextafterf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3061extern _Float64 nextdownf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nextdownf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3062extern _Float64 nextupf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nextupf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3063extern _Float64 remainderf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __remainderf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3064extern _Float64 scalbnf64 (_Float64 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __scalbnf64 (_Float64 __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3065extern int ilogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3066extern long int llogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3067extern _Float64 scalblnf64 (_Float64 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __scalblnf64 (_Float64 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3068extern _Float64 nearbyintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nearbyintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3069extern _Float64 roundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __roundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3070extern _Float64 truncf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __truncf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3071extern _Float64 remquof64 (_Float64 __x, _Float64 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __remquof64 (_Float64 __x, _Float64 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3072extern long int lrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3073__extension__
3074extern long long int llrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3075extern long int lroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3076__extension__
3077extern long long int llroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3078extern _Float64 fdimf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __fdimf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3079extern _Float64 fmaxf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fmaxf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3080extern _Float64 fminf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fminf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3081extern _Float64 fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) __attribute__ ((__nothrow__ , __leaf__));
3082extern _Float64 roundevenf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __roundevenf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3083extern __intmax_t fromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3084extern __uintmax_t ufromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3085extern __intmax_t fromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3086extern __uintmax_t ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3087extern _Float64 fmaxmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fmaxmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3088extern _Float64 fminmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fminmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3089extern int canonicalizef64 (_Float64 *__cx, const _Float64 *__x) __attribute__ ((__nothrow__ , __leaf__));
3090extern int totalorderf64 (const _Float64 *__x, const _Float64 *__y) __attribute__ ((__nothrow__ , __leaf__))
3091 __attribute__ ((__pure__));
3092extern int totalordermagf64 (const _Float64 *__x, const _Float64 *__y) __attribute__ ((__nothrow__ , __leaf__))
3093 __attribute__ ((__pure__));
3094extern _Float64 getpayloadf64 (const _Float64 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __getpayloadf64 (const _Float64 *__x) __attribute__ ((__nothrow__ , __leaf__));
3095extern int setpayloadf64 (_Float64 *__x, _Float64 __payload) __attribute__ ((__nothrow__ , __leaf__));
3096extern int setpayloadsigf64 (_Float64 *__x, _Float64 __payload) __attribute__ ((__nothrow__ , __leaf__));
3097extern int __fpclassifyf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3098 __attribute__ ((__const__));
3099extern int __signbitf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3100 __attribute__ ((__const__));
3101extern int __isinff128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3102 __attribute__ ((__const__));
3103extern int __finitef128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3104 __attribute__ ((__const__));
3105extern int __isnanf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3106 __attribute__ ((__const__));
3107extern int __iseqsigf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3108extern int __issignalingf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3109 __attribute__ ((__const__));
3110extern _Float128 acosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __acosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3111extern _Float128 asinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __asinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3112extern _Float128 atanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __atanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3113extern _Float128 atan2f128 (_Float128 __y, _Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __atan2f128 (_Float128 __y, _Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3114 extern _Float128 cosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __cosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3115 extern _Float128 sinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __sinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3116extern _Float128 tanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __tanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3117extern _Float128 coshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __coshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3118extern _Float128 sinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __sinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3119extern _Float128 tanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __tanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3120 extern void sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) __attribute__ ((__nothrow__ , __leaf__));
3121extern _Float128 acoshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __acoshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3122extern _Float128 asinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __asinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3123extern _Float128 atanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __atanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3124 extern _Float128 expf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __expf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3125extern _Float128 frexpf128 (_Float128 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __frexpf128 (_Float128 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
3126extern _Float128 ldexpf128 (_Float128 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __ldexpf128 (_Float128 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
3127 extern _Float128 logf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __logf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3128extern _Float128 log10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __log10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3129extern _Float128 modff128 (_Float128 __x, _Float128 *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __modff128 (_Float128 __x, _Float128 *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3130extern _Float128 exp10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __exp10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3131extern _Float128 expm1f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __expm1f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3132extern _Float128 log1pf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __log1pf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3133extern _Float128 logbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __logbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3134extern _Float128 exp2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __exp2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3135extern _Float128 log2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __log2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3136 extern _Float128 powf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __powf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3137extern _Float128 sqrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __sqrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3138extern _Float128 hypotf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __hypotf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3139extern _Float128 cbrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __cbrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3140extern _Float128 ceilf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __ceilf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3141extern _Float128 fabsf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fabsf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3142extern _Float128 floorf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __floorf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3143extern _Float128 fmodf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __fmodf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3144extern _Float128 copysignf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __copysignf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3145extern _Float128 nanf128 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nanf128 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3146extern _Float128 j0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __j0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3147extern _Float128 j1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __j1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3148extern _Float128 jnf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __jnf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__));
3149extern _Float128 y0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __y0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3150extern _Float128 y1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __y1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3151extern _Float128 ynf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __ynf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__));
3152extern _Float128 erff128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __erff128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3153extern _Float128 erfcf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __erfcf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3154extern _Float128 lgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __lgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3155extern _Float128 tgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __tgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3156extern _Float128 lgammaf128_r (_Float128, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __lgammaf128_r (_Float128, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3157extern _Float128 rintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __rintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3158extern _Float128 nextafterf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nextafterf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3159extern _Float128 nextdownf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nextdownf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3160extern _Float128 nextupf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nextupf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3161extern _Float128 remainderf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __remainderf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3162extern _Float128 scalbnf128 (_Float128 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __scalbnf128 (_Float128 __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3163extern int ilogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3164extern long int llogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3165extern _Float128 scalblnf128 (_Float128 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __scalblnf128 (_Float128 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3166extern _Float128 nearbyintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nearbyintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3167extern _Float128 roundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __roundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3168extern _Float128 truncf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __truncf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3169extern _Float128 remquof128 (_Float128 __x, _Float128 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __remquof128 (_Float128 __x, _Float128 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3170extern long int lrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3171__extension__
3172extern long long int llrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3173extern long int lroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3174__extension__
3175extern long long int llroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3176extern _Float128 fdimf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __fdimf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3177extern _Float128 fmaxf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fmaxf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3178extern _Float128 fminf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fminf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3179extern _Float128 fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) __attribute__ ((__nothrow__ , __leaf__));
3180extern _Float128 roundevenf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __roundevenf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3181extern __intmax_t fromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3182extern __uintmax_t ufromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3183extern __intmax_t fromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3184extern __uintmax_t ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3185extern _Float128 fmaxmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fmaxmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3186extern _Float128 fminmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fminmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3187extern int canonicalizef128 (_Float128 *__cx, const _Float128 *__x) __attribute__ ((__nothrow__ , __leaf__));
3188extern int totalorderf128 (const _Float128 *__x, const _Float128 *__y) __attribute__ ((__nothrow__ , __leaf__))
3189 __attribute__ ((__pure__));
3190extern int totalordermagf128 (const _Float128 *__x, const _Float128 *__y) __attribute__ ((__nothrow__ , __leaf__))
3191 __attribute__ ((__pure__));
3192extern _Float128 getpayloadf128 (const _Float128 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __getpayloadf128 (const _Float128 *__x) __attribute__ ((__nothrow__ , __leaf__));
3193extern int setpayloadf128 (_Float128 *__x, _Float128 __payload) __attribute__ ((__nothrow__ , __leaf__));
3194extern int setpayloadsigf128 (_Float128 *__x, _Float128 __payload) __attribute__ ((__nothrow__ , __leaf__));
3195extern _Float32x acosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __acosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3196extern _Float32x asinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __asinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3197extern _Float32x atanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __atanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3198extern _Float32x atan2f32x (_Float32x __y, _Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __atan2f32x (_Float32x __y, _Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3199 extern _Float32x cosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __cosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3200 extern _Float32x sinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __sinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3201extern _Float32x tanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __tanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3202extern _Float32x coshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __coshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3203extern _Float32x sinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __sinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3204extern _Float32x tanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __tanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3205 extern void sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) __attribute__ ((__nothrow__ , __leaf__));
3206extern _Float32x acoshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __acoshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3207extern _Float32x asinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __asinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3208extern _Float32x atanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __atanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3209 extern _Float32x expf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __expf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3210extern _Float32x frexpf32x (_Float32x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __frexpf32x (_Float32x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
3211extern _Float32x ldexpf32x (_Float32x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __ldexpf32x (_Float32x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
3212 extern _Float32x logf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __logf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3213extern _Float32x log10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __log10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3214extern _Float32x modff32x (_Float32x __x, _Float32x *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __modff32x (_Float32x __x, _Float32x *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3215extern _Float32x exp10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __exp10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3216extern _Float32x expm1f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __expm1f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3217extern _Float32x log1pf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __log1pf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3218extern _Float32x logbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __logbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3219extern _Float32x exp2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __exp2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3220extern _Float32x log2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __log2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3221 extern _Float32x powf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __powf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3222extern _Float32x sqrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __sqrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3223extern _Float32x hypotf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __hypotf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3224extern _Float32x cbrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __cbrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3225extern _Float32x ceilf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __ceilf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3226extern _Float32x fabsf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fabsf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3227extern _Float32x floorf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __floorf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3228extern _Float32x fmodf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __fmodf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3229extern _Float32x copysignf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __copysignf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3230extern _Float32x nanf32x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nanf32x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3231extern _Float32x j0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __j0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3232extern _Float32x j1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __j1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3233extern _Float32x jnf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __jnf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__));
3234extern _Float32x y0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __y0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3235extern _Float32x y1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __y1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3236extern _Float32x ynf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __ynf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__));
3237extern _Float32x erff32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __erff32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3238extern _Float32x erfcf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __erfcf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3239extern _Float32x lgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __lgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3240extern _Float32x tgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __tgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3241extern _Float32x lgammaf32x_r (_Float32x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __lgammaf32x_r (_Float32x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3242extern _Float32x rintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __rintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3243extern _Float32x nextafterf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nextafterf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3244extern _Float32x nextdownf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nextdownf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3245extern _Float32x nextupf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nextupf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3246extern _Float32x remainderf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __remainderf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3247extern _Float32x scalbnf32x (_Float32x __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __scalbnf32x (_Float32x __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3248extern int ilogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3249extern long int llogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3250extern _Float32x scalblnf32x (_Float32x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __scalblnf32x (_Float32x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3251extern _Float32x nearbyintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nearbyintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3252extern _Float32x roundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __roundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3253extern _Float32x truncf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __truncf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3254extern _Float32x remquof32x (_Float32x __x, _Float32x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __remquof32x (_Float32x __x, _Float32x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3255extern long int lrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3256__extension__
3257extern long long int llrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3258extern long int lroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3259__extension__
3260extern long long int llroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3261extern _Float32x fdimf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __fdimf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3262extern _Float32x fmaxf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fmaxf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3263extern _Float32x fminf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fminf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3264extern _Float32x fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) __attribute__ ((__nothrow__ , __leaf__));
3265extern _Float32x roundevenf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __roundevenf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3266extern __intmax_t fromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3267extern __uintmax_t ufromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3268extern __intmax_t fromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3269extern __uintmax_t ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3270extern _Float32x fmaxmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fmaxmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3271extern _Float32x fminmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fminmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3272extern int canonicalizef32x (_Float32x *__cx, const _Float32x *__x) __attribute__ ((__nothrow__ , __leaf__));
3273extern int totalorderf32x (const _Float32x *__x, const _Float32x *__y) __attribute__ ((__nothrow__ , __leaf__))
3274 __attribute__ ((__pure__));
3275extern int totalordermagf32x (const _Float32x *__x, const _Float32x *__y) __attribute__ ((__nothrow__ , __leaf__))
3276 __attribute__ ((__pure__));
3277extern _Float32x getpayloadf32x (const _Float32x *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __getpayloadf32x (const _Float32x *__x) __attribute__ ((__nothrow__ , __leaf__));
3278extern int setpayloadf32x (_Float32x *__x, _Float32x __payload) __attribute__ ((__nothrow__ , __leaf__));
3279extern int setpayloadsigf32x (_Float32x *__x, _Float32x __payload) __attribute__ ((__nothrow__ , __leaf__));
3280extern _Float64x acosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __acosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3281extern _Float64x asinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __asinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3282extern _Float64x atanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __atanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3283extern _Float64x atan2f64x (_Float64x __y, _Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __atan2f64x (_Float64x __y, _Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3284 extern _Float64x cosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __cosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3285 extern _Float64x sinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __sinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3286extern _Float64x tanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __tanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3287extern _Float64x coshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __coshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3288extern _Float64x sinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __sinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3289extern _Float64x tanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __tanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3290 extern void sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) __attribute__ ((__nothrow__ , __leaf__));
3291extern _Float64x acoshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __acoshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3292extern _Float64x asinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __asinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3293extern _Float64x atanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __atanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3294 extern _Float64x expf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __expf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3295extern _Float64x frexpf64x (_Float64x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __frexpf64x (_Float64x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
3296extern _Float64x ldexpf64x (_Float64x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __ldexpf64x (_Float64x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
3297 extern _Float64x logf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __logf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3298extern _Float64x log10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __log10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3299extern _Float64x modff64x (_Float64x __x, _Float64x *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __modff64x (_Float64x __x, _Float64x *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3300extern _Float64x exp10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __exp10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3301extern _Float64x expm1f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __expm1f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3302extern _Float64x log1pf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __log1pf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3303extern _Float64x logbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __logbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3304extern _Float64x exp2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __exp2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3305extern _Float64x log2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __log2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3306 extern _Float64x powf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __powf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3307extern _Float64x sqrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __sqrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3308extern _Float64x hypotf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __hypotf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3309extern _Float64x cbrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __cbrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3310extern _Float64x ceilf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __ceilf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3311extern _Float64x fabsf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fabsf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3312extern _Float64x floorf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __floorf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3313extern _Float64x fmodf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __fmodf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3314extern _Float64x copysignf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __copysignf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3315extern _Float64x nanf64x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nanf64x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3316extern _Float64x j0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __j0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3317extern _Float64x j1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __j1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3318extern _Float64x jnf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __jnf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__));
3319extern _Float64x y0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __y0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3320extern _Float64x y1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __y1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3321extern _Float64x ynf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __ynf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__));
3322extern _Float64x erff64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __erff64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3323extern _Float64x erfcf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __erfcf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3324extern _Float64x lgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __lgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3325extern _Float64x tgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __tgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3326extern _Float64x lgammaf64x_r (_Float64x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __lgammaf64x_r (_Float64x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3327extern _Float64x rintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __rintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3328extern _Float64x nextafterf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nextafterf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3329extern _Float64x nextdownf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nextdownf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3330extern _Float64x nextupf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nextupf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3331extern _Float64x remainderf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __remainderf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3332extern _Float64x scalbnf64x (_Float64x __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __scalbnf64x (_Float64x __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3333extern int ilogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3334extern long int llogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3335extern _Float64x scalblnf64x (_Float64x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __scalblnf64x (_Float64x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3336extern _Float64x nearbyintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nearbyintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3337extern _Float64x roundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __roundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3338extern _Float64x truncf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __truncf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3339extern _Float64x remquof64x (_Float64x __x, _Float64x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __remquof64x (_Float64x __x, _Float64x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3340extern long int lrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3341__extension__
3342extern long long int llrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3343extern long int lroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3344__extension__
3345extern long long int llroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3346extern _Float64x fdimf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __fdimf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3347extern _Float64x fmaxf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fmaxf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3348extern _Float64x fminf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fminf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3349extern _Float64x fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) __attribute__ ((__nothrow__ , __leaf__));
3350extern _Float64x roundevenf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __roundevenf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3351extern __intmax_t fromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3352extern __uintmax_t ufromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3353extern __intmax_t fromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3354extern __uintmax_t ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3355extern _Float64x fmaxmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fmaxmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3356extern _Float64x fminmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fminmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3357extern int canonicalizef64x (_Float64x *__cx, const _Float64x *__x) __attribute__ ((__nothrow__ , __leaf__));
3358extern int totalorderf64x (const _Float64x *__x, const _Float64x *__y) __attribute__ ((__nothrow__ , __leaf__))
3359 __attribute__ ((__pure__));
3360extern int totalordermagf64x (const _Float64x *__x, const _Float64x *__y) __attribute__ ((__nothrow__ , __leaf__))
3361 __attribute__ ((__pure__));
3362extern _Float64x getpayloadf64x (const _Float64x *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __getpayloadf64x (const _Float64x *__x) __attribute__ ((__nothrow__ , __leaf__));
3363extern int setpayloadf64x (_Float64x *__x, _Float64x __payload) __attribute__ ((__nothrow__ , __leaf__));
3364extern int setpayloadsigf64x (_Float64x *__x, _Float64x __payload) __attribute__ ((__nothrow__ , __leaf__));
3365extern float fadd (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3366extern float fdiv (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3367extern float fmul (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3368extern float fsub (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3369extern float faddl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3370extern float fdivl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3371extern float fmull (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3372extern float fsubl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3373extern double daddl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3374extern double ddivl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3375extern double dmull (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3376extern double dsubl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3377extern _Float32 f32addf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3378extern _Float32 f32divf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3379extern _Float32 f32mulf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3380extern _Float32 f32subf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3381extern _Float32 f32addf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3382extern _Float32 f32divf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3383extern _Float32 f32mulf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3384extern _Float32 f32subf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3385extern _Float32 f32addf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3386extern _Float32 f32divf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3387extern _Float32 f32mulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3388extern _Float32 f32subf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3389extern _Float32 f32addf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3390extern _Float32 f32divf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3391extern _Float32 f32mulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3392extern _Float32 f32subf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3393extern _Float32x f32xaddf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3394extern _Float32x f32xdivf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3395extern _Float32x f32xmulf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3396extern _Float32x f32xsubf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3397extern _Float32x f32xaddf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3398extern _Float32x f32xdivf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3399extern _Float32x f32xmulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3400extern _Float32x f32xsubf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3401extern _Float32x f32xaddf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3402extern _Float32x f32xdivf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3403extern _Float32x f32xmulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3404extern _Float32x f32xsubf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3405extern _Float64 f64addf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3406extern _Float64 f64divf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3407extern _Float64 f64mulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3408extern _Float64 f64subf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3409extern _Float64 f64addf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3410extern _Float64 f64divf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3411extern _Float64 f64mulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3412extern _Float64 f64subf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3413extern _Float64x f64xaddf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3414extern _Float64x f64xdivf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3415extern _Float64x f64xmulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3416extern _Float64x f64xsubf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3417extern int signgam;
3418enum
3419 {
3420 FP_NAN =
3421 0,
3422 FP_INFINITE =
3423 1,
3424 FP_ZERO =
3425 2,
3426 FP_SUBNORMAL =
3427 3,
3428 FP_NORMAL =
3429 4
3430 };
3431extern int __iscanonicall (long double __x)
3432 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3433
3434struct timex
3435{
3436 unsigned int modes;
3437 __syscall_slong_t offset;
3438 __syscall_slong_t freq;
3439 __syscall_slong_t maxerror;
3440 __syscall_slong_t esterror;
3441 int status;
3442 __syscall_slong_t constant;
3443 __syscall_slong_t precision;
3444 __syscall_slong_t tolerance;
3445 struct timeval time;
3446 __syscall_slong_t tick;
3447 __syscall_slong_t ppsfreq;
3448 __syscall_slong_t jitter;
3449 int shift;
3450 __syscall_slong_t stabil;
3451 __syscall_slong_t jitcnt;
3452 __syscall_slong_t calcnt;
3453 __syscall_slong_t errcnt;
3454 __syscall_slong_t stbcnt;
3455 int tai;
3456 int :32; int :32; int :32; int :32;
3457 int :32; int :32; int :32; int :32;
3458 int :32; int :32; int :32;
3459};
3460
3461extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __attribute__ ((__nothrow__ , __leaf__));
3462
3463struct tm
3464{
3465 int tm_sec;
3466 int tm_min;
3467 int tm_hour;
3468 int tm_mday;
3469 int tm_mon;
3470 int tm_year;
3471 int tm_wday;
3472 int tm_yday;
3473 int tm_isdst;
3474 long int tm_gmtoff;
3475 const char *tm_zone;
3476};
3477struct itimerspec
3478 {
3479 struct timespec it_interval;
3480 struct timespec it_value;
3481 };
3482struct sigevent;
3483
3484extern clock_t clock (void) __attribute__ ((__nothrow__ , __leaf__));
3485extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
3486extern double difftime (time_t __time1, time_t __time0)
3487 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3488extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
3489extern size_t strftime (char *__restrict __s, size_t __maxsize,
3490 const char *__restrict __format,
3491 const struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
3492extern char *strptime (const char *__restrict __s,
3493 const char *__restrict __fmt, struct tm *__tp)
3494 __attribute__ ((__nothrow__ , __leaf__));
3495extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
3496 const char *__restrict __format,
3497 const struct tm *__restrict __tp,
3498 locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
3499extern char *strptime_l (const char *__restrict __s,
3500 const char *__restrict __fmt, struct tm *__tp,
3501 locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
3502extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
3503extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
3504extern struct tm *gmtime_r (const time_t *__restrict __timer,
3505 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
3506extern struct tm *localtime_r (const time_t *__restrict __timer,
3507 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
3508extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
3509extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
3510extern char *asctime_r (const struct tm *__restrict __tp,
3511 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
3512extern char *ctime_r (const time_t *__restrict __timer,
3513 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
3514extern char *__tzname[2];
3515extern int __daylight;
3516extern long int __timezone;
3517extern char *tzname[2];
3518extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__));
3519extern int daylight;
3520extern long int timezone;
3521extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
3522extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
3523extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3524extern int nanosleep (const struct timespec *__requested_time,
3525 struct timespec *__remaining);
3526extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ , __leaf__));
3527extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__));
3528extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
3529 __attribute__ ((__nothrow__ , __leaf__));
3530extern int clock_nanosleep (clockid_t __clock_id, int __flags,
3531 const struct timespec *__req,
3532 struct timespec *__rem);
3533extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__));
3534extern int timer_create (clockid_t __clock_id,
3535 struct sigevent *__restrict __evp,
3536 timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__));
3537extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
3538extern int timer_settime (timer_t __timerid, int __flags,
3539 const struct itimerspec *__restrict __value,
3540 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__));
3541extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
3542 __attribute__ ((__nothrow__ , __leaf__));
3543extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
3544extern int timespec_get (struct timespec *__ts, int __base)
3545 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3546extern int getdate_err;
3547extern struct tm *getdate (const char *__string);
3548extern int getdate_r (const char *__restrict __string,
3549 struct tm *__restrict __resbufp);
3550
3551
3552struct timezone
3553 {
3554 int tz_minuteswest;
3555 int tz_dsttime;
3556 };
3557extern int gettimeofday (struct timeval *__restrict __tv,
3558 void *__restrict __tz) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3559extern int settimeofday (const struct timeval *__tv,
3560 const struct timezone *__tz)
3561 __attribute__ ((__nothrow__ , __leaf__));
3562extern int adjtime (const struct timeval *__delta,
3563 struct timeval *__olddelta) __attribute__ ((__nothrow__ , __leaf__));
3564enum __itimer_which
3565 {
3566 ITIMER_REAL = 0,
3567 ITIMER_VIRTUAL = 1,
3568 ITIMER_PROF = 2
3569 };
3570struct itimerval
3571 {
3572 struct timeval it_interval;
3573 struct timeval it_value;
3574 };
3575typedef enum __itimer_which __itimer_which_t;
3576extern int getitimer (__itimer_which_t __which,
3577 struct itimerval *__value) __attribute__ ((__nothrow__ , __leaf__));
3578extern int setitimer (__itimer_which_t __which,
3579 const struct itimerval *__restrict __new,
3580 struct itimerval *__restrict __old) __attribute__ ((__nothrow__ , __leaf__));
3581extern int utimes (const char *__file, const struct timeval __tvp[2])
3582 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3583extern int lutimes (const char *__file, const struct timeval __tvp[2])
3584 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3585extern int futimes (int __fd, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__));
3586extern int futimesat (int __fd, const char *__file,
3587 const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__));
3588
3589
3590
3591extern size_t strlcpy(char *, const char*, size_t);
3592extern size_t strlcat(char *, const char*, size_t);
3593extern void setproctitle(const char *fmt, ...);
3594
3595
3596typedef unsigned long VALUE;
3597typedef unsigned long ID;
3598__extension__ _Static_assert(4 == sizeof(int), "sizeof_int" ": " "SIZEOF_INT == sizeof(int)");
3599__extension__ _Static_assert(8 == sizeof(long), "sizeof_long" ": " "SIZEOF_LONG == sizeof(long)");
3600__extension__ _Static_assert(8 == sizeof(long long), "sizeof_long_long" ": " "SIZEOF_LONG_LONG == sizeof(LONG_LONG)");
3601__extension__ _Static_assert(8 == sizeof(void *), "sizeof_voidp" ": " "SIZEOF_VOIDP == sizeof(void *)");
3602
3603
3604VALUE rb_class_new(VALUE);
3605VALUE rb_mod_init_copy(VALUE, VALUE);
3606VALUE rb_singleton_class_clone(VALUE);
3607void rb_singleton_class_attached(VALUE,VALUE);
3608void rb_check_inheritable(VALUE);
3609VALUE rb_define_class_id(ID, VALUE);
3610VALUE rb_define_class_id_under(VALUE, ID, VALUE);
3611VALUE rb_module_new(void);
3612VALUE rb_define_module_id(ID);
3613VALUE rb_define_module_id_under(VALUE, ID);
3614VALUE rb_mod_included_modules(VALUE);
3615VALUE rb_mod_include_p(VALUE, VALUE);
3616VALUE rb_mod_ancestors(VALUE);
3617VALUE rb_class_instance_methods(int, const VALUE*, VALUE);
3618VALUE rb_class_public_instance_methods(int, const VALUE*, VALUE);
3619VALUE rb_class_protected_instance_methods(int, const VALUE*, VALUE);
3620VALUE rb_class_private_instance_methods(int, const VALUE*, VALUE);
3621VALUE rb_obj_singleton_methods(int, const VALUE*, VALUE);
3622void rb_define_method_id(VALUE, ID, VALUE (*)(), int);
3623void rb_undef(VALUE, ID);
3624void rb_define_protected_method(VALUE, const char*, VALUE (*)(), int);
3625void rb_define_private_method(VALUE, const char*, VALUE (*)(), int);
3626void rb_define_singleton_method(VALUE, const char*, VALUE(*)(), int);
3627VALUE rb_singleton_class(VALUE);
3628
3629
3630
3631
3632int rb_sourceline(void);
3633const char *rb_sourcefile(void);
3634int rb_frame_method_id_and_class(ID *idp, VALUE *klassp);
3635VALUE rb_check_funcall(VALUE, ID, int, const VALUE*);
3636VALUE rb_check_funcall_kw(VALUE, ID, int, const VALUE*, int);
3637void rb_remove_method(VALUE, const char*);
3638void rb_remove_method_id(VALUE, ID);
3639VALUE rb_eval_cmd_kw(VALUE, VALUE, int);
3640VALUE rb_apply(VALUE, ID, VALUE);
3641VALUE rb_obj_instance_eval(int, const VALUE*, VALUE);
3642VALUE rb_obj_instance_exec(int, const VALUE*, VALUE);
3643VALUE rb_mod_module_eval(int, const VALUE*, VALUE);
3644VALUE rb_mod_module_exec(int, const VALUE*, VALUE);
3645typedef VALUE (*rb_alloc_func_t)(VALUE);
3647void rb_undef_alloc_func(VALUE);
3649void rb_clear_constant_cache(void);
3650void rb_clear_method_cache_by_class(VALUE);
3651void rb_alias(VALUE, ID, ID);
3652void rb_attr(VALUE,ID,int,int,int);
3653int rb_method_boundp(VALUE, ID, int);
3654int rb_method_basic_definition_p(VALUE, ID);
3655int rb_obj_respond_to(VALUE, ID, int);
3656int rb_respond_to(VALUE, ID);
3657__attribute__((__noreturn__))
3658VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker);
3659void rb_backtrace(void);
3660VALUE rb_make_backtrace(void);
3661
3662
3663
3664
3665void rb_define_method(VALUE,const char*,VALUE(*)(),int);
3666void rb_define_module_function(VALUE,const char*,VALUE(*)(),int);
3667void rb_define_global_function(const char*,VALUE(*)(),int);
3668void rb_undef_method(VALUE,const char*);
3669void rb_define_alias(VALUE,const char*,const char*);
3670void rb_define_attr(VALUE,const char*,int,int);
3671
3672
3673[[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_m3(VALUE, const char *, VALUE(*)(), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_00(VALUE, const char *, VALUE(*)(VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
3674[[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_m3(VALUE, const char *, VALUE(*)(), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_00(VALUE, const char *, VALUE(*)(VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
3675[[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_m3(VALUE, const char *, VALUE(*)(), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_00(VALUE, const char *, VALUE(*)(VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
3676[[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_m3(VALUE, const char *, VALUE(*)(), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_00(VALUE, const char *, VALUE(*)(VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
3677[[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_m3(const char *, VALUE(*)(), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_m2(const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_m1(const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_00(const char *, VALUE(*)(VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_01(const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_02(const char *, VALUE(*)(VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_03(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_04(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_05(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_06(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_07(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_08(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_09(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_10(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_11(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_12(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_13(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_14(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_15(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
3678[[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_m3(VALUE, ID, VALUE(*)(), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_m2(VALUE, ID, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_m1(VALUE, ID, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_00(VALUE, ID, VALUE(*)(VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_01(VALUE, ID, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_02(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_03(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_04(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_05(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_06(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_07(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_08(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_09(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_10(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_11(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_12(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_13(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_14(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_15(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
3679[[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_m3(VALUE, const char *, VALUE(*)(), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_00(VALUE, const char *, VALUE(*)(VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
3680
3681
3682VALUE rb_int2big(intptr_t i);
3683VALUE rb_int2inum(intptr_t i);
3684VALUE rb_uint2big(uintptr_t i);
3685VALUE rb_uint2inum(uintptr_t i);
3686
3687
3688enum
3689
3690ruby_special_consts {
3691 RUBY_Qfalse = 0x00,
3692 RUBY_Qtrue = 0x14,
3693 RUBY_Qnil = 0x08,
3694 RUBY_Qundef = 0x34,
3695 RUBY_IMMEDIATE_MASK = 0x07,
3696 RUBY_FIXNUM_FLAG = 0x01,
3697 RUBY_FLONUM_MASK = 0x03,
3698 RUBY_FLONUM_FLAG = 0x02,
3699 RUBY_SYMBOL_FLAG = 0x0c,
3701};
3702__attribute__((__const__))
3703
3704__attribute__((__artificial__))
3705static inline _Bool
3706RB_TEST(VALUE obj)
3707{
3708 return obj & ~RUBY_Qnil;
3709}
3710__attribute__((__const__))
3711
3712__attribute__((__artificial__))
3713static inline _Bool
3714RB_NIL_P(VALUE obj)
3715{
3716 return obj == RUBY_Qnil;
3717}
3718__attribute__((__const__))
3719
3720__attribute__((__artificial__))
3721static inline _Bool
3722RB_FIXNUM_P(VALUE obj)
3723{
3724 return obj & RUBY_FIXNUM_FLAG;
3725}
3726__attribute__((__const__))
3727
3728__attribute__((__artificial__))
3729static inline _Bool
3730RB_STATIC_SYM_P(VALUE obj)
3731{
3732
3733 const VALUE mask = ~((0x7fffffffffffffffL * 2UL + 1UL) << RUBY_SPECIAL_SHIFT);
3734 return (obj & mask) == RUBY_SYMBOL_FLAG;
3735}
3736__attribute__((__const__))
3737
3738__attribute__((__artificial__))
3739static inline _Bool
3740RB_FLONUM_P(VALUE obj)
3741{
3742 return (obj & RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG;
3743}
3744__attribute__((__const__))
3745
3746__attribute__((__artificial__))
3747static inline _Bool
3748RB_IMMEDIATE_P(VALUE obj)
3749{
3750 return obj & RUBY_IMMEDIATE_MASK;
3751}
3752__attribute__((__const__))
3753
3754__attribute__((__artificial__))
3755static inline _Bool
3756RB_SPECIAL_CONST_P(VALUE obj)
3757{
3758 return RB_IMMEDIATE_P(obj) || ! RB_TEST(obj);
3759}
3760__attribute__((__const__))
3761
3762static inline VALUE
3763rb_special_const_p(VALUE obj)
3764{
3765 return RB_SPECIAL_CONST_P(obj) * RUBY_Qtrue;
3766}
3767
3768
3769__attribute__((__noreturn__))
3770__attribute__((__cold__))
3771void rb_out_of_int(long num);
3772long rb_num2long(VALUE num);
3773unsigned long rb_num2ulong(VALUE num);
3774
3775
3776__attribute__((__const__))
3777
3778__attribute__((__artificial__))
3779static inline VALUE
3780RB_INT2FIX(long i)
3781{
3782 ((void)0);
3783 const unsigned long j = i;
3784 const unsigned long k = 2 * j + RUBY_FIXNUM_FLAG;
3785 const long l = k;
3786 const long m = l;
3787 const VALUE n = m;
3788 ((void)0);
3789 return n;
3790}
3791static inline int
3792rb_long2int_inline(long n)
3793{
3794 int i = ((int)n);
3795 if (sizeof(long) <= sizeof(int)) {
3796 ((__builtin_expect(!!(!!(i == n)), 1)) ? ((void)0) : __builtin_unreachable());
3797 }
3798 if (i != n)
3799 rb_out_of_int(n);
3800 return i;
3801}
3802__attribute__((__const__))
3803
3804static inline long
3805rbimpl_fix2long_by_idiv(VALUE x)
3806{
3807 ((void)0);
3808 const long y = x - RUBY_FIXNUM_FLAG;
3809 const long z = y / 2;
3810 const long w = ((long)z);
3811 ((void)0);
3812 return w;
3813}
3814__attribute__((__const__))
3815
3816static inline long
3817rbimpl_fix2long_by_shift(VALUE x)
3818{
3819 ((void)0);
3820 const long y = x;
3821 const long z = y >> 1;
3822 const long w = ((long)z);
3823 ((void)0);
3824 return w;
3825}
3826__attribute__((__const__))
3827
3828static inline _Bool
3829rbimpl_right_shift_is_arithmetic_p(void)
3830{
3831 return (-1 >> 1) == -1;
3832}
3833__attribute__((__const__))
3834
3835static inline long
3836rb_fix2long(VALUE x)
3837{
3838 if (rbimpl_right_shift_is_arithmetic_p()) {
3839 return rbimpl_fix2long_by_shift(x);
3840 }
3841 else {
3842 return rbimpl_fix2long_by_idiv(x);
3843 }
3844}
3845__attribute__((__const__))
3846
3847static inline unsigned long
3848rb_fix2ulong(VALUE x)
3849{
3850 ((void)0);
3851 return rb_fix2long(x);
3852}
3853static inline long
3854rb_num2long_inline(VALUE x)
3855{
3856 if (RB_FIXNUM_P(x))
3857 return rb_fix2long(x);
3858 else
3859 return rb_num2long(x);
3860}
3861static inline unsigned long
3862rb_num2ulong_inline(VALUE x)
3863{
3864 if (RB_FIXNUM_P(x))
3865 return rb_fix2ulong(x);
3866 else
3867 return rb_num2ulong(x);
3868}
3869static inline VALUE
3870rb_long2num_inline(long v)
3871{
3872 if ((((v) < (0x7fffffffffffffffL / 2) + 1) && ((v) >= ((-0x7fffffffffffffffL - 1L) / 2))))
3873 return RB_INT2FIX(v);
3874 else
3875 return rb_int2big(v);
3876}
3877static inline VALUE
3878rb_ulong2num_inline(unsigned long v)
3879{
3880 if (((v) < (0x7fffffffffffffffL / 2) + 1))
3881 return RB_INT2FIX(v);
3882 else
3883 return rb_uint2big(v);
3884}
3885
3886
3887long rb_num2int(VALUE);
3888long rb_fix2int(VALUE);
3889unsigned long rb_num2uint(VALUE);
3890unsigned long rb_fix2uint(VALUE);
3891
3892
3893__attribute__((__artificial__))
3894static inline int
3895RB_FIX2INT(VALUE x)
3896{
3897 long ret;
3898 if (sizeof(int) < sizeof(long)) {
3899 ret = rb_fix2int(x);
3900 }
3901 else {
3902 ret = rb_fix2long(x);
3903 }
3904 return ((int)ret);
3905}
3906static inline int
3907rb_num2int_inline(VALUE x)
3908{
3909 long ret;
3910 if (sizeof(int) == sizeof(long)) {
3911 ret = rb_num2long_inline(x);
3912 }
3913 else if (RB_FIXNUM_P(x)) {
3914 ret = rb_fix2int(x);
3915 }
3916 else {
3917 ret = rb_num2int(x);
3918 }
3919 return ((int)ret);
3920}
3921__attribute__((__artificial__))
3922static inline unsigned int
3923RB_NUM2UINT(VALUE x)
3924{
3925 unsigned long ret;
3926 if (sizeof(int) < sizeof(long)) {
3927 ret = rb_num2uint(x);
3928 }
3929 else {
3930 ret = rb_num2ulong_inline(x);
3931 }
3932 return ((unsigned int)ret);
3933}
3934__attribute__((__artificial__))
3935static inline unsigned int
3936RB_FIX2UINT(VALUE x)
3937{
3938 unsigned long ret;
3939 if (sizeof(int) < sizeof(long)) {
3940 ret = rb_fix2uint(x);
3941 }
3942 else {
3943 ret = rb_fix2ulong(x);
3944 }
3945 return ((unsigned int)ret);
3946}
3947
3948
3949
3950
3951static inline VALUE
3952rb_int2num_inline(int v)
3953{
3954 if ((((v) < (0x7fffffffffffffffL / 2) + 1) && ((v) >= ((-0x7fffffffffffffffL - 1L) / 2))))
3955 return RB_INT2FIX(v);
3956 else
3957 return rb_int2big(v);
3958}
3959static inline VALUE
3960rb_uint2num_inline(unsigned int v)
3961{
3962 if (((v) < (0x7fffffffffffffffL / 2) + 1))
3963 return RB_INT2FIX(v);
3964 else
3965 return rb_uint2big(v);
3966}
3967
3968
3969enum ruby_rvalue_flags { RVALUE_EMBED_LEN_MAX = 3 };
3970struct
3971__attribute__((__aligned__(8)))
3972RBasic {
3973 VALUE flags;
3974 const VALUE klass;
3975};
3976
3977
3978VALUE rb_obj_hide(VALUE obj);
3979VALUE rb_obj_reveal(VALUE obj, VALUE klass);
3980
3981
3982__attribute__((__pure__))
3983__attribute__((__artificial__))
3984static inline VALUE
3985RBASIC_CLASS(VALUE obj)
3986{
3987 ((void)0);
3988 return ((struct RBasic *)(obj))->klass;
3989}
3990enum
3991
3992ruby_value_type {
3993 RUBY_T_NONE = 0x00,
3994 RUBY_T_OBJECT = 0x01,
3995 RUBY_T_CLASS = 0x02,
3996 RUBY_T_MODULE = 0x03,
3997 RUBY_T_FLOAT = 0x04,
3998 RUBY_T_STRING = 0x05,
3999 RUBY_T_REGEXP = 0x06,
4000 RUBY_T_ARRAY = 0x07,
4001 RUBY_T_HASH = 0x08,
4002 RUBY_T_STRUCT = 0x09,
4003 RUBY_T_BIGNUM = 0x0a,
4004 RUBY_T_FILE = 0x0b,
4005 RUBY_T_DATA = 0x0c,
4006 RUBY_T_MATCH = 0x0d,
4007 RUBY_T_COMPLEX = 0x0e,
4008 RUBY_T_RATIONAL = 0x0f,
4009 RUBY_T_NIL = 0x11,
4010 RUBY_T_TRUE = 0x12,
4011 RUBY_T_FALSE = 0x13,
4012 RUBY_T_SYMBOL = 0x14,
4013 RUBY_T_FIXNUM = 0x15,
4014 RUBY_T_UNDEF = 0x16,
4015 RUBY_T_IMEMO = 0x1a,
4016 RUBY_T_NODE = 0x1b,
4017 RUBY_T_ICLASS = 0x1c,
4018 RUBY_T_ZOMBIE = 0x1d,
4019 RUBY_T_MOVED = 0x1e,
4020 RUBY_T_MASK = 0x1f
4021};
4022
4023
4024__attribute__((__cold__))
4025void rb_check_type(VALUE obj, int t);
4026
4027
4028__attribute__((__pure__))
4029__attribute__((__artificial__))
4030static inline enum ruby_value_type
4031RB_BUILTIN_TYPE(VALUE obj)
4032{
4033 ((void)0);
4034 VALUE ret = ((struct RBasic *)(obj))->flags & RUBY_T_MASK;
4035 return ((enum ruby_value_type)ret);
4036}
4037__attribute__((__pure__))
4038static inline _Bool
4039rb_integer_type_p(VALUE obj)
4040{
4041 if (RB_FIXNUM_P(obj)) {
4042 return 1;
4043 }
4044 else if (RB_SPECIAL_CONST_P(obj)) {
4045 return 0;
4046 }
4047 else {
4048 return RB_BUILTIN_TYPE(obj) == RUBY_T_BIGNUM;
4049 }
4050}
4051__attribute__((__pure__))
4052static inline enum ruby_value_type
4053rb_type(VALUE obj)
4054{
4055 if (! RB_SPECIAL_CONST_P(obj)) {
4056 return RB_BUILTIN_TYPE(obj);
4057 }
4058 else if (obj == ((VALUE)RUBY_Qfalse)) {
4059 return RUBY_T_FALSE;
4060 }
4061 else if (obj == ((VALUE)RUBY_Qnil)) {
4062 return RUBY_T_NIL;
4063 }
4064 else if (obj == ((VALUE)RUBY_Qtrue)) {
4065 return RUBY_T_TRUE;
4066 }
4067 else if (obj == ((VALUE)RUBY_Qundef)) {
4068 return RUBY_T_UNDEF;
4069 }
4070 else if (RB_FIXNUM_P(obj)) {
4071 return RUBY_T_FIXNUM;
4072 }
4073 else if (RB_STATIC_SYM_P(obj)) {
4074 return RUBY_T_SYMBOL;
4075 }
4076 else {
4077 ((__builtin_expect(!!(!!(RB_FLONUM_P(obj))), 1)) ? ((void)0) : __builtin_unreachable());
4078 return RUBY_T_FLOAT;
4079 }
4080}
4081__attribute__((__pure__))
4082__attribute__((__artificial__))
4083static inline _Bool
4084RB_FLOAT_TYPE_P(VALUE obj)
4085{
4086 if (RB_FLONUM_P(obj)) {
4087 return 1;
4088 }
4089 else if (RB_SPECIAL_CONST_P(obj)) {
4090 return 0;
4091 }
4092 else {
4093 return RB_BUILTIN_TYPE(obj) == RUBY_T_FLOAT;
4094 }
4095}
4096__attribute__((__pure__))
4097__attribute__((__artificial__))
4098static inline _Bool
4099RB_DYNAMIC_SYM_P(VALUE obj)
4100{
4101 if (RB_SPECIAL_CONST_P(obj)) {
4102 return 0;
4103 }
4104 else {
4105 return RB_BUILTIN_TYPE(obj) == RUBY_T_SYMBOL;
4106 }
4107}
4108__attribute__((__pure__))
4109__attribute__((__artificial__))
4110static inline _Bool
4111RB_SYMBOL_P(VALUE obj)
4112{
4113 return RB_STATIC_SYM_P(obj) || RB_DYNAMIC_SYM_P(obj);
4114}
4115__attribute__((__pure__))
4116__attribute__((__artificial__))
4117__attribute__((__always_inline__)) inline
4118static _Bool
4119rbimpl_RB_TYPE_P_fastpath(VALUE obj, enum ruby_value_type t)
4120{
4121 if (t == RUBY_T_TRUE) {
4122 return obj == ((VALUE)RUBY_Qtrue);
4123 }
4124 else if (t == RUBY_T_FALSE) {
4125 return obj == ((VALUE)RUBY_Qfalse);
4126 }
4127 else if (t == RUBY_T_NIL) {
4128 return obj == ((VALUE)RUBY_Qnil);
4129 }
4130 else if (t == RUBY_T_UNDEF) {
4131 return obj == ((VALUE)RUBY_Qundef);
4132 }
4133 else if (t == RUBY_T_FIXNUM) {
4134 return RB_FIXNUM_P(obj);
4135 }
4136 else if (t == RUBY_T_SYMBOL) {
4137 return RB_SYMBOL_P(obj);
4138 }
4139 else if (t == RUBY_T_FLOAT) {
4140 return RB_FLOAT_TYPE_P(obj);
4141 }
4142 else if (RB_SPECIAL_CONST_P(obj)) {
4143 return 0;
4144 }
4145 else if (t == RB_BUILTIN_TYPE(obj)) {
4146 return 1;
4147 }
4148 else {
4149 return 0;
4150 }
4151}
4152__attribute__((__pure__))
4153__attribute__((__artificial__))
4154static inline _Bool
4155RB_TYPE_P(VALUE obj, enum ruby_value_type t)
4156{
4157 if (__builtin_constant_p(t)) {
4158 return rbimpl_RB_TYPE_P_fastpath(obj, t);
4159 }
4160 else {
4161 return t == rb_type(obj);
4162 }
4163}
4164__attribute__((__pure__))
4165__attribute__((__artificial__))
4166static inline _Bool rbimpl_rtypeddata_p(VALUE obj);
4167__attribute__((__artificial__))
4168static inline void
4169Check_Type(VALUE v, enum ruby_value_type t)
4170{
4171 if ((__builtin_expect(!!(! RB_TYPE_P(v, t)), 0))) {
4172 goto slowpath;
4173 }
4174 else if (t != RUBY_T_DATA) {
4175 goto fastpath;
4176 }
4177 else if (rbimpl_rtypeddata_p(v)) {
4178 goto slowpath;
4179 }
4180 else {
4181 goto fastpath;
4182 }
4183 fastpath:
4184 return;
4185 slowpath:
4186 rb_check_type(v, t);
4187}
4188enum ruby_fl_ushift { RUBY_FL_USHIFT = 12 };
4189__extension__
4190enum
4191
4192ruby_fl_type {
4193 RUBY_FL_WB_PROTECTED = (1<<5),
4194 RUBY_FL_PROMOTED0 = (1<<5),
4195 RUBY_FL_PROMOTED1 = (1<<6),
4197 RUBY_FL_FINALIZE = (1<<7),
4198 RUBY_FL_TAINT = (1<<8),
4199 RUBY_FL_SHAREABLE = (1<<8),
4201 RUBY_FL_SEEN_OBJ_ID = (1<<9),
4202 RUBY_FL_EXIVAR = (1<<10),
4203 RUBY_FL_FREEZE = (1<<11),
4204 RUBY_FL_USER0 = (1<<(RUBY_FL_USHIFT+0)),
4205 RUBY_FL_USER1 = (1<<(RUBY_FL_USHIFT+1)),
4206 RUBY_FL_USER2 = (1<<(RUBY_FL_USHIFT+2)),
4207 RUBY_FL_USER3 = (1<<(RUBY_FL_USHIFT+3)),
4208 RUBY_FL_USER4 = (1<<(RUBY_FL_USHIFT+4)),
4209 RUBY_FL_USER5 = (1<<(RUBY_FL_USHIFT+5)),
4210 RUBY_FL_USER6 = (1<<(RUBY_FL_USHIFT+6)),
4211 RUBY_FL_USER7 = (1<<(RUBY_FL_USHIFT+7)),
4212 RUBY_FL_USER8 = (1<<(RUBY_FL_USHIFT+8)),
4213 RUBY_FL_USER9 = (1<<(RUBY_FL_USHIFT+9)),
4214 RUBY_FL_USER10 = (1<<(RUBY_FL_USHIFT+10)),
4215 RUBY_FL_USER11 = (1<<(RUBY_FL_USHIFT+11)),
4216 RUBY_FL_USER12 = (1<<(RUBY_FL_USHIFT+12)),
4217 RUBY_FL_USER13 = (1<<(RUBY_FL_USHIFT+13)),
4218 RUBY_FL_USER14 = (1<<(RUBY_FL_USHIFT+14)),
4219 RUBY_FL_USER15 = (1<<(RUBY_FL_USHIFT+15)),
4220 RUBY_FL_USER16 = (1<<(RUBY_FL_USHIFT+16)),
4221 RUBY_FL_USER17 = (1<<(RUBY_FL_USHIFT+17)),
4222 RUBY_FL_USER18 = (1<<(RUBY_FL_USHIFT+18)),
4223 RUBY_FL_USER19 = (1<<(RUBY_FL_USHIFT+19)),
4226};
4228
4229
4230void rb_obj_infect(VALUE victim, VALUE carrier);
4231void rb_freeze_singleton_class(VALUE klass);
4232
4233
4234__attribute__((__pure__))
4235__attribute__((__artificial__))
4236__attribute__((__always_inline__)) inline
4237static _Bool
4238RB_FL_ABLE(VALUE obj)
4239{
4240 if (RB_SPECIAL_CONST_P(obj)) {
4241 return 0;
4242 }
4243 else if (RB_TYPE_P(obj, RUBY_T_NODE)) {
4244 return 0;
4245 }
4246 else {
4247 return 1;
4248 }
4249}
4250__attribute__((__pure__))
4251__attribute__((__artificial__))
4252static inline VALUE
4253RB_FL_TEST_RAW(VALUE obj, VALUE flags)
4254{
4255 ((void)0);
4256 return ((struct RBasic *)(obj))->flags & flags;
4257}
4258__attribute__((__pure__))
4259__attribute__((__artificial__))
4260static inline VALUE
4261RB_FL_TEST(VALUE obj, VALUE flags)
4262{
4263 if (RB_FL_ABLE(obj)) {
4264 return RB_FL_TEST_RAW(obj, flags);
4265 }
4266 else {
4267 return 0UL;
4268 }
4269}
4270__attribute__((__pure__))
4271__attribute__((__artificial__))
4272static inline _Bool
4273RB_FL_ANY_RAW(VALUE obj, VALUE flags)
4274{
4275 return RB_FL_TEST_RAW(obj, flags);
4276}
4277__attribute__((__pure__))
4278__attribute__((__artificial__))
4279static inline _Bool
4280RB_FL_ANY(VALUE obj, VALUE flags)
4281{
4282 return RB_FL_TEST(obj, flags);
4283}
4284__attribute__((__pure__))
4285__attribute__((__artificial__))
4286static inline _Bool
4287RB_FL_ALL_RAW(VALUE obj, VALUE flags)
4288{
4289 return RB_FL_TEST_RAW(obj, flags) == flags;
4290}
4291__attribute__((__pure__))
4292__attribute__((__artificial__))
4293static inline _Bool
4294RB_FL_ALL(VALUE obj, VALUE flags)
4295{
4296 return RB_FL_TEST(obj, flags) == flags;
4297}
4298
4299__attribute__((__artificial__))
4300static inline void
4301rbimpl_fl_set_raw_raw(struct RBasic *obj, VALUE flags)
4302{
4303 obj->flags |= flags;
4304}
4305__attribute__((__artificial__))
4306static inline void
4307RB_FL_SET_RAW(VALUE obj, VALUE flags)
4308{
4309 ((void)0);
4310 rbimpl_fl_set_raw_raw(((struct RBasic *)(obj)), flags);
4311}
4312__attribute__((__artificial__))
4313static inline void
4314RB_FL_SET(VALUE obj, VALUE flags)
4315{
4316 if (RB_FL_ABLE(obj)) {
4317 RB_FL_SET_RAW(obj, flags);
4318 }
4319}
4320
4321__attribute__((__artificial__))
4322static inline void
4323rbimpl_fl_unset_raw_raw(struct RBasic *obj, VALUE flags)
4324{
4325 obj->flags &= ~flags;
4326}
4327__attribute__((__artificial__))
4328static inline void
4329RB_FL_UNSET_RAW(VALUE obj, VALUE flags)
4330{
4331 ((void)0);
4332 rbimpl_fl_unset_raw_raw(((struct RBasic *)(obj)), flags);
4333}
4334__attribute__((__artificial__))
4335static inline void
4336RB_FL_UNSET(VALUE obj, VALUE flags)
4337{
4338 if (RB_FL_ABLE(obj)) {
4339 RB_FL_UNSET_RAW(obj, flags);
4340 }
4341}
4342
4343__attribute__((__artificial__))
4344static inline void
4345rbimpl_fl_reverse_raw_raw(struct RBasic *obj, VALUE flags)
4346{
4347 obj->flags ^= flags;
4348}
4349__attribute__((__artificial__))
4350static inline void
4351RB_FL_REVERSE_RAW(VALUE obj, VALUE flags)
4352{
4353 ((void)0);
4354 rbimpl_fl_reverse_raw_raw(((struct RBasic *)(obj)), flags);
4355}
4356__attribute__((__artificial__))
4357static inline void
4358RB_FL_REVERSE(VALUE obj, VALUE flags)
4359{
4360 if (RB_FL_ABLE(obj)) {
4362 }
4363}
4364__attribute__((__pure__))
4365__attribute__((__artificial__))
4366static inline _Bool
4367RB_OBJ_TAINTABLE(VALUE obj)
4368{
4369 if (! RB_FL_ABLE(obj)) {
4370 return 0;
4371 }
4372 else if (RB_TYPE_P(obj, RUBY_T_BIGNUM)) {
4373 return 0;
4374 }
4375 else if (RB_TYPE_P(obj, RUBY_T_FLOAT)) {
4376 return 0;
4377 }
4378 else {
4379 return 1;
4380 }
4381}
4382__attribute__((__pure__))
4383__attribute__((__artificial__))
4384static inline VALUE
4385RB_OBJ_TAINTED_RAW(VALUE obj)
4386{
4387 return RB_FL_TEST_RAW(obj, RUBY_FL_TAINT);
4388}
4389__attribute__((__pure__))
4390__attribute__((__artificial__))
4391static inline _Bool
4392RB_OBJ_TAINTED(VALUE obj)
4393{
4394 return RB_FL_ANY(obj, RUBY_FL_TAINT);
4395}
4396__attribute__((__artificial__))
4397static inline void
4398RB_OBJ_TAINT_RAW(VALUE obj)
4399{
4401}
4402__attribute__((__artificial__))
4403static inline void
4404RB_OBJ_TAINT(VALUE obj)
4405{
4406 if (RB_OBJ_TAINTABLE(obj)) {
4407 RB_OBJ_TAINT_RAW(obj);
4408 }
4409}
4410__attribute__((__artificial__))
4411static inline void
4412RB_OBJ_INFECT_RAW(VALUE dst, VALUE src)
4413{
4414 ((void)0);
4415 ((void)0);
4417}
4418__attribute__((__artificial__))
4419static inline void
4420RB_OBJ_INFECT(VALUE dst, VALUE src)
4421{
4422 if (RB_OBJ_TAINTABLE(dst) && RB_FL_ABLE(src)) {
4423 RB_OBJ_INFECT_RAW(dst, src);
4424 }
4425}
4426__attribute__((__pure__))
4427__attribute__((__artificial__))
4428static inline VALUE
4429RB_OBJ_FROZEN_RAW(VALUE obj)
4430{
4431 return RB_FL_TEST_RAW(obj, RUBY_FL_FREEZE);
4432}
4433__attribute__((__pure__))
4434__attribute__((__artificial__))
4435static inline _Bool
4436RB_OBJ_FROZEN(VALUE obj)
4437{
4438 if (! RB_FL_ABLE(obj)) {
4439 return 1;
4440 }
4441 else {
4442 return RB_OBJ_FROZEN_RAW(obj);
4443 }
4444}
4445__attribute__((__artificial__))
4446static inline void
4447RB_OBJ_FREEZE_RAW(VALUE obj)
4448{
4450}
4451static inline void
4452rb_obj_freeze_inline(VALUE x)
4453{
4454 if (RB_FL_ABLE(x)) {
4456 if (RBASIC_CLASS(x) && !(((struct RBasic *)(x))->flags & RUBY_FL_SINGLETON)) {
4457 rb_freeze_singleton_class(x);
4458 }
4459 }
4460}
4461enum ruby_rstring_flags {
4462 RSTRING_NOEMBED = RUBY_FL_USER1,
4463 RSTRING_EMBED_LEN_MASK = RUBY_FL_USER2 | RUBY_FL_USER3 | RUBY_FL_USER4 |
4465 RSTRING_FSTR = RUBY_FL_USER17
4466};
4467enum ruby_rstring_consts {
4468 RSTRING_EMBED_LEN_SHIFT = RUBY_FL_USHIFT + 2,
4469 RSTRING_EMBED_LEN_MAX = ((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / (sizeof(char)))) - 1
4470};
4471struct RString {
4472 struct RBasic basic;
4473 union {
4474 struct {
4475 long len;
4476 char *ptr;
4477 union {
4478 long capa;
4479 VALUE shared;
4480 } aux;
4481 } heap;
4482 char ary[RSTRING_EMBED_LEN_MAX + 1];
4483 } as;
4484};
4485
4486
4487VALUE rb_str_to_str(VALUE);
4488VALUE rb_string_value(volatile VALUE*);
4489char *rb_string_value_ptr(volatile VALUE*);
4490char *rb_string_value_cstr(volatile VALUE*);
4491VALUE rb_str_export(VALUE);
4492VALUE rb_str_export_locale(VALUE);
4493__attribute__((__error__ ("rb_check_safe_str() and Check_SafeStr() are obsolete; use StringValue() instead")))
4494void rb_check_safe_str(VALUE);
4495
4496
4497__attribute__((__pure__))
4498__attribute__((__artificial__))
4499static inline long
4500RSTRING_EMBED_LEN(VALUE str)
4501{
4502 ((void)0);
4503 ((void)0);
4504 VALUE f = ((struct RBasic *)(str))->flags;
4505 f &= RSTRING_EMBED_LEN_MASK;
4506 f >>= RSTRING_EMBED_LEN_SHIFT;
4507 return ((long)f);
4508}
4509
4510
4511__attribute__((__pure__))
4512__attribute__((__artificial__))
4513static inline struct RString
4514rbimpl_rstring_getmem(VALUE str)
4515{
4516 ((void)0);
4517 if (RB_FL_ANY_RAW(str, RSTRING_NOEMBED)) {
4518 return *((struct RString *)(str));
4519 }
4520 else {
4521 struct RString retval;
4522 retval.as.heap.len = RSTRING_EMBED_LEN(str);
4523 retval.as.heap.ptr = ((struct RString *)(str))->as.ary;
4524 return retval;
4525 }
4526}
4527
4528
4529__attribute__((__pure__))
4530__attribute__((__artificial__))
4531static inline long
4532RSTRING_LEN(VALUE str)
4533{
4534 return rbimpl_rstring_getmem(str).as.heap.len;
4535}
4536__attribute__((__artificial__))
4537static inline char *
4538RSTRING_PTR(VALUE str)
4539{
4540 char *ptr = rbimpl_rstring_getmem(str).as.heap.ptr;
4541 if ((__builtin_expect(!!(! ptr), 0))) {
4542 fprintf(stderr, "%s\n",
4543 "RSTRING_PTR is returning NULL!! "
4544 "SIGSEGV is highly expected to follow immediately. "
4545 "If you could reproduce, attach your debugger here, "
4546 "and look at the passed string."
4547 );
4548 }
4549 return ptr;
4550}
4551__attribute__((__artificial__))
4552static inline char *
4553RSTRING_END(VALUE str)
4554{
4555 struct RString buf = rbimpl_rstring_getmem(str);
4556 if ((__builtin_expect(!!(! buf.as.heap.ptr), 0))) {
4557 fprintf(stderr, "%s\n",
4558 "RSTRING_END is returning NULL!! "
4559 "SIGSEGV is highly expected to follow immediately. "
4560 "If you could reproduce, attach your debugger here, "
4561 "and look at the passed string."
4562 );
4563 }
4564 return &buf.as.heap.ptr[buf.as.heap.len];
4565}
4566__attribute__((__artificial__))
4567static inline int
4568RSTRING_LENINT(VALUE str)
4569{
4570 return rb_long2int_inline(RSTRING_LEN(str));
4571}
4572__attribute__((__const__))
4573
4574__attribute__((__artificial__))
4575static inline VALUE
4576RB_CHR2FIX(unsigned char c)
4577{
4578 return RB_INT2FIX(c);
4579}
4580static inline char
4581rb_num2char_inline(VALUE x)
4582{
4583 if (RB_TYPE_P(x, RUBY_T_STRING) && (RSTRING_LEN(x)>=1))
4584 return RSTRING_PTR(x)[0];
4585 else
4586 return ((char)rb_num2int_inline(x));
4587}
4588
4589
4590double rb_num2dbl(VALUE);
4591__attribute__((__pure__))
4592double rb_float_value(VALUE);
4593VALUE rb_float_new(double);
4594VALUE rb_float_new_in_heap(double);
4595
4596
4597
4598
4599VALUE rb_ll2inum(long long);
4600VALUE rb_ull2inum(unsigned long long);
4601long long rb_num2ll(VALUE);
4602unsigned long long rb_num2ull(VALUE);
4603
4604
4605static inline long long
4606rb_num2ll_inline(VALUE x)
4607{
4608 if (RB_FIXNUM_P(x))
4609 return rb_fix2long(x);
4610 else
4611 return rb_num2ll(x);
4612}
4613
4614
4615short rb_num2short(VALUE);
4616unsigned short rb_num2ushort(VALUE);
4617short rb_fix2short(VALUE);
4618unsigned short rb_fix2ushort(VALUE);
4619
4620
4621static inline short
4622rb_num2short_inline(VALUE x)
4623{
4624 if (RB_FIXNUM_P(x))
4625 return rb_fix2short(x);
4626 else
4627 return rb_num2short(x);
4628}
4629
4630
4631typedef unsigned long st_data_t;
4632typedef struct st_table st_table;
4633typedef st_data_t st_index_t;
4634typedef int st_compare_func(st_data_t, st_data_t);
4635typedef st_index_t st_hash_func(st_data_t);
4636typedef char st_check_for_sizeof_st_index_t[8 == (int)sizeof(st_index_t) ? 1 : -1];
4637struct st_hash_type {
4638 int (*compare)(st_data_t, st_data_t);
4639 st_index_t (*hash)(st_data_t);
4640};
4641typedef struct st_table_entry st_table_entry;
4642struct st_table_entry;
4643struct st_table {
4644 unsigned char entry_power, bin_power, size_ind;
4645 unsigned int rebuilds_num;
4646 const struct st_hash_type *type;
4647 st_index_t num_entries;
4648 st_index_t *bins;
4649 st_index_t entries_start, entries_bound;
4650 st_table_entry *entries;
4651};
4652enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK, ST_REPLACE};
4653st_table *rb_st_init_table(const struct st_hash_type *);
4654st_table *rb_st_init_table_with_size(const struct st_hash_type *, st_index_t);
4655st_table *rb_st_init_numtable(void);
4656st_table *rb_st_init_numtable_with_size(st_index_t);
4657st_table *rb_st_init_strtable(void);
4658st_table *rb_st_init_strtable_with_size(st_index_t);
4659st_table *rb_st_init_strcasetable(void);
4660st_table *rb_st_init_strcasetable_with_size(st_index_t);
4661int rb_st_delete(st_table *, st_data_t *, st_data_t *);
4662int rb_st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t);
4663int rb_st_shift(st_table *, st_data_t *, st_data_t *);
4664int rb_st_insert(st_table *, st_data_t, st_data_t);
4665int rb_st_insert2(st_table *, st_data_t, st_data_t, st_data_t (*)(st_data_t));
4666int rb_st_lookup(st_table *, st_data_t, st_data_t *);
4667int rb_st_get_key(st_table *, st_data_t, st_data_t *);
4668typedef int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing);
4669int rb_st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg);
4670typedef int st_foreach_callback_func(st_data_t, st_data_t, st_data_t);
4671typedef int st_foreach_check_callback_func(st_data_t, st_data_t, st_data_t, int);
4672int rb_st_foreach_with_replace(st_table *tab, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg);
4673int rb_st_foreach(st_table *, st_foreach_callback_func *, st_data_t);
4674int rb_st_foreach_check(st_table *, st_foreach_check_callback_func *, st_data_t, st_data_t);
4675st_index_t rb_st_keys(st_table *table, st_data_t *keys, st_index_t size);
4676st_index_t rb_st_keys_check(st_table *table, st_data_t *keys, st_index_t size, st_data_t never);
4677st_index_t rb_st_values(st_table *table, st_data_t *values, st_index_t size);
4678st_index_t rb_st_values_check(st_table *table, st_data_t *values, st_index_t size, st_data_t never);
4679void rb_st_add_direct(st_table *, st_data_t, st_data_t);
4680void rb_st_free_table(st_table *);
4681void rb_st_cleanup_safe(st_table *, st_data_t);
4682void rb_st_clear(st_table *);
4683st_table *rb_st_copy(st_table *);
4684__attribute__((__const__)) int rb_st_numcmp(st_data_t, st_data_t);
4685__attribute__((__const__)) st_index_t rb_st_numhash(st_data_t);
4686__attribute__((__pure__)) int rb_st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
4687__attribute__((__pure__)) int rb_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
4688__attribute__((__pure__)) size_t rb_st_memsize(const st_table *);
4689__attribute__((__pure__)) st_index_t rb_st_hash(const void *ptr, size_t len, st_index_t h);
4690__attribute__((__const__)) st_index_t rb_st_hash_uint32(st_index_t h, uint32_t i);
4691__attribute__((__const__)) st_index_t rb_st_hash_uint(st_index_t h, st_index_t i);
4692__attribute__((__const__)) st_index_t rb_st_hash_end(st_index_t h);
4693__attribute__((__const__)) st_index_t rb_st_hash_start(st_index_t h);
4694void rb_hash_bulk_insert_into_st_table(long, const VALUE *, VALUE);
4695
4696
4697__attribute__((__const__))
4698
4699__attribute__((__artificial__))
4700static inline VALUE
4701RB_ST2FIX(st_data_t i)
4702{
4703 long x = i;
4704 if (x >= 0) {
4705 x &= (0x7fffffffffffffffL / 2);
4706 }
4707 else {
4708 x |= ((-0x7fffffffffffffffL - 1L) / 2);
4709 }
4710 ((void)0);
4711 unsigned long y = ((unsigned long)x);
4712 return RB_INT2FIX(y);
4713}
4714
4715
4716void rb_gc_writebarrier(VALUE a, VALUE b);
4717void rb_gc_writebarrier_unprotect(VALUE obj);
4718
4719
4720__attribute__((__pure__))
4721__attribute__((__artificial__))
4722static inline _Bool
4723RB_OBJ_PROMOTED_RAW(VALUE obj)
4724{
4725 ((void)0);
4726 return RB_FL_ANY_RAW(obj, RUBY_FL_PROMOTED);
4727}
4728__attribute__((__pure__))
4729__attribute__((__artificial__))
4730static inline _Bool
4731RB_OBJ_PROMOTED(VALUE obj)
4732{
4733 if (! RB_FL_ABLE(obj)) {
4734 return 0;
4735 }
4736 else {
4737 return RB_OBJ_PROMOTED_RAW(obj);
4738 }
4739}
4740static inline VALUE
4741rb_obj_wb_unprotect(VALUE x, const char *filename [[maybe_unused]], int line [[maybe_unused]])
4742{
4744 return x;
4745}
4746static inline VALUE
4747rb_obj_written(VALUE a, VALUE oldv [[maybe_unused]], VALUE b, const char *filename [[maybe_unused]], int line [[maybe_unused]])
4748{
4749 if (!RB_SPECIAL_CONST_P(b)) {
4750 rb_gc_writebarrier(a, b);
4751 }
4752 return a;
4753}
4754static inline VALUE
4755rb_obj_write(VALUE a, VALUE *slot, VALUE b, const char *filename [[maybe_unused]], int line [[maybe_unused]])
4756{
4757 *slot = b;
4758 rb_obj_written(a, ((VALUE)RUBY_Qundef) , b, filename, line);
4759 return a;
4760}
4761enum ruby_rarray_flags {
4762 RARRAY_EMBED_FLAG = RUBY_FL_USER1,
4763 RARRAY_EMBED_LEN_MASK = RUBY_FL_USER4 | RUBY_FL_USER3
4764 ,
4765 RARRAY_TRANSIENT_FLAG = RUBY_FL_USER13
4766};
4767enum ruby_rarray_consts {
4769 RARRAY_EMBED_LEN_MAX = ((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / (sizeof(VALUE))))
4770};
4771struct RArray {
4772 struct RBasic basic;
4773 union {
4774 struct {
4775 long len;
4776 union {
4777 long capa;
4778 const
4779 VALUE shared_root;
4780 } aux;
4781 const VALUE *ptr;
4782 } heap;
4783 const VALUE ary[RARRAY_EMBED_LEN_MAX];
4784 } as;
4785};
4786
4787
4788VALUE *rb_ary_ptr_use_start(VALUE ary);
4789void rb_ary_ptr_use_end(VALUE a);
4790void rb_ary_detransient(VALUE a);
4791
4792
4793__attribute__((__pure__))
4794__attribute__((__artificial__))
4795static inline long
4796RARRAY_EMBED_LEN(VALUE ary)
4797{
4798 ((void)0);
4799 ((void)0);
4800 VALUE f = ((struct RBasic *)(ary))->flags;
4801 f &= RARRAY_EMBED_LEN_MASK;
4803 return ((long)f);
4804}
4805__attribute__((__pure__))
4806static inline long
4807rb_array_len(VALUE a)
4808{
4809 ((void)0);
4810 if (RB_FL_ANY_RAW(a, RARRAY_EMBED_FLAG)) {
4811 return RARRAY_EMBED_LEN(a);
4812 }
4813 else {
4814 return ((struct RArray *)(a))->as.heap.len;
4815 }
4816}
4817__attribute__((__artificial__))
4818static inline int
4819RARRAY_LENINT(VALUE ary)
4820{
4821 return rb_long2int_inline(rb_array_len(ary));
4822}
4823__attribute__((__pure__))
4824__attribute__((__artificial__))
4825static inline _Bool
4826RARRAY_TRANSIENT_P(VALUE ary)
4827{
4828 ((void)0);
4829 return RB_FL_ANY_RAW(ary, RARRAY_TRANSIENT_FLAG);
4830}
4831__attribute__((__pure__))
4832static inline const VALUE *
4833rb_array_const_ptr_transient(VALUE a)
4834{
4835 ((void)0);
4836 if (RB_FL_ANY_RAW(a, RARRAY_EMBED_FLAG)) {
4837 return (((struct RArray *)(a))->as.ary);
4838 }
4839 else {
4840 return (((struct RArray *)(a))->as.heap.ptr);
4841 }
4842}
4843static inline const VALUE *
4844rb_array_const_ptr(VALUE a)
4845{
4846 ((void)0);
4847 if (RARRAY_TRANSIENT_P(a)) {
4849 }
4850 return rb_array_const_ptr_transient(a);
4851}
4852static inline VALUE *
4853rb_array_ptr_use_start(VALUE a,
4854 [[maybe_unused]]
4855 int allow_transient)
4856{
4857 ((void)0);
4858 if (!allow_transient) {
4859 if (RARRAY_TRANSIENT_P(a)) {
4861 }
4862 }
4863 return rb_ary_ptr_use_start(a);
4864}
4865static inline void
4866rb_array_ptr_use_end(VALUE a,
4867 [[maybe_unused]]
4868 int allow_transient)
4869{
4870 ((void)0);
4871 rb_ary_ptr_use_end(a);
4872}
4873static inline VALUE *
4874RARRAY_PTR(VALUE ary)
4875{
4876 ((void)0);
4877 VALUE tmp = (1 ? rb_obj_wb_unprotect(ary, "./include/ruby/internal/core/rarray.h", 248) : ary);
4878 return ((VALUE *)rb_array_const_ptr(tmp));
4879}
4880static inline void
4881RARRAY_ASET(VALUE ary, long i, VALUE v)
4882{
4883 do { ((void)0); const VALUE rbimpl_ary = (ary); VALUE *ptr = rb_array_ptr_use_start(rbimpl_ary, (1)); (rb_obj_write((VALUE)(ary), (VALUE *)(&ptr[i]), (VALUE)(v), "./include/ruby/internal/core/rarray.h", 256)); rb_array_ptr_use_end(rbimpl_ary, (1)); } while (0);
4884}
4885
4886
4887int rb_big_sign(VALUE num);
4888
4889
4890static inline _Bool
4891RBIGNUM_POSITIVE_P(VALUE b) {
4892 ((void)0);
4893 return rb_big_sign(b);
4894}
4895static inline _Bool
4896RBIGNUM_NEGATIVE_P(VALUE b) {
4897 ((void)0);
4898 return ! RBIGNUM_POSITIVE_P(b);
4899}
4900enum ruby_rmodule_flags {
4901 RMODULE_IS_OVERLAID = RUBY_FL_USER2,
4902 RMODULE_IS_REFINEMENT = RUBY_FL_USER3,
4903 RMODULE_INCLUDED_INTO_REFINEMENT = RUBY_FL_USER4
4904};
4905struct RClass;
4906
4907
4908VALUE rb_class_get_superclass(VALUE);
4909
4910
4911typedef void (*RUBY_DATA_FUNC)(void*);
4912struct RData {
4913 struct RBasic basic;
4916 void *data;
4917};
4918
4919
4920VALUE rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree);
4921VALUE rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree);
4922extern VALUE rb_cObject;
4923
4924
4925__attribute__((__warning__ ("untyped Data is unsafe; use TypedData instead"))) __attribute__((__deprecated__ ("by TypedData")))
4926static inline VALUE
4927rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
4928{
4929 return rb_data_object_wrap(klass, ptr, mark, free);
4930}
4931static inline void *
4932rb_data_object_get(VALUE obj)
4933{
4934 Check_Type(obj, RUBY_T_DATA);
4935 return ((struct RData *)(obj))->data;
4936}
4937__attribute__((__warning__ ("untyped Data is unsafe; use TypedData instead"))) __attribute__((__deprecated__ ("by TypedData")))
4938static inline void *
4939rb_data_object_get_warning(VALUE obj)
4940{
4941 return rb_data_object_get(obj);
4942}
4943static inline VALUE
4944rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_func, void **datap, size_t size)
4945{
4946 VALUE result = rb_data_object_zalloc( (klass), (size), ((void (*)(void *))(mark_func)), ((void (*)(void *))(free_func))); (*datap) = ((void *)((struct RData *)(result))->data); ((void)(*datap));
4947 return result;
4948}
4949__attribute__((__deprecated__ ("by: rb_data_object_wrap")))
4950static inline VALUE
4951rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
4952{
4953 return rb_data_object_wrap(klass, data, dmark, dfree);
4954}
4955__attribute__((__deprecated__ ("by: rb_cObject. Will be removed in 3.1.")))
4956__attribute__((__pure__))
4957static inline VALUE
4958rb_cData(void)
4959{
4960 return rb_cObject;
4961}
4962struct rb_io_t;
4963struct RFile {
4964 struct RBasic basic;
4965 struct rb_io_t *fptr;
4966};
4967struct st_table;
4968
4969
4970size_t rb_hash_size_num(VALUE hash);
4971struct st_table *rb_hash_tbl(VALUE, const char *file, int line);
4972VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone);
4973
4974
4975enum ruby_robject_flags { ROBJECT_EMBED = RUBY_FL_USER1 };
4976enum ruby_robject_consts { ROBJECT_EMBED_LEN_MAX = ((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / (sizeof(VALUE)))) };
4977struct st_table;
4978struct RObject {
4979 struct RBasic basic;
4980 union {
4981 struct {
4982 uint32_t numiv;
4983 VALUE *ivptr;
4984 struct st_table *iv_index_tbl;
4985 } heap;
4987 } as;
4988};
4989__attribute__((__pure__))
4990__attribute__((__artificial__))
4991static inline uint32_t
4992ROBJECT_NUMIV(VALUE obj)
4993{
4994 ((void)0);
4995 if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) {
4996 return ROBJECT_EMBED_LEN_MAX;
4997 }
4998 else {
4999 return ((struct RObject *)(obj))->as.heap.numiv;
5000 }
5001}
5002__attribute__((__pure__))
5003__attribute__((__artificial__))
5004static inline VALUE *
5005ROBJECT_IVPTR(VALUE obj)
5006{
5007 ((void)0);
5008 struct RObject *const ptr = ((struct RObject *)(obj));
5009 if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) {
5010 return ptr->as.ary;
5011 }
5012 else {
5013 return ptr->as.heap.ivptr;
5014 }
5015}
5016struct re_patter_buffer;
5017struct RRegexp {
5018 struct RBasic basic;
5019 struct re_pattern_buffer *ptr;
5020 const VALUE src;
5021 unsigned long usecnt;
5022};
5023__attribute__((__pure__))
5024__attribute__((__artificial__))
5025static inline VALUE
5026RREGEXP_SRC(VALUE rexp)
5027{
5028 ((void)0);
5029 VALUE ret = ((struct RRegexp *)(rexp))->src;
5030 ((void)0);
5031 return ret;
5032}
5033__attribute__((__pure__))
5034__attribute__((__artificial__))
5035static inline char *
5036RREGEXP_SRC_PTR(VALUE rexp)
5037{
5038 return RSTRING_PTR(RREGEXP_SRC(rexp));
5039}
5040__attribute__((__pure__))
5041__attribute__((__artificial__))
5042static inline long
5043RREGEXP_SRC_LEN(VALUE rexp)
5044{
5045 return RSTRING_LEN(RREGEXP_SRC(rexp));
5046}
5047__attribute__((__pure__))
5048__attribute__((__artificial__))
5049static inline char *
5050RREGEXP_SRC_END(VALUE rexp)
5051{
5052 return RSTRING_END(RREGEXP_SRC(rexp));
5053}
5054
5055
5056VALUE rb_struct_size(VALUE s);
5057VALUE rb_struct_aref(VALUE, VALUE);
5058VALUE rb_struct_aset(VALUE, VALUE, VALUE);
5059
5060
5061__attribute__((__artificial__))
5062static inline long
5063RSTRUCT_LEN(VALUE st)
5064{
5065 ((void)0);
5067}
5068__attribute__((__artificial__))
5069static inline VALUE
5070RSTRUCT_SET(VALUE st, int k, VALUE v)
5071{
5072 ((void)0);
5073 return rb_struct_aset(st, rb_int2num_inline(k), (v));
5074}
5075__attribute__((__artificial__))
5076static inline VALUE
5077RSTRUCT_GET(VALUE st, int k)
5078{
5079 ((void)0);
5080 return rb_struct_aref(st, rb_int2num_inline(k));
5081}
5082
5083
5084VALUE rb_errinfo(void);
5085void rb_set_errinfo(VALUE);
5086typedef enum {
5090 RB_WARN_CATEGORY_ALL_BITS = 0x6
5092enum rb_io_wait_readwrite {RB_IO_WAIT_READABLE, RB_IO_WAIT_WRITABLE};
5093__attribute__((__format__(__printf__, (2), (3)))) __attribute__((__noreturn__)) void rb_raise(VALUE, const char*, ...);
5094__attribute__((__format__(__printf__, (1), (2)))) __attribute__((__noreturn__)) void rb_fatal(const char*, ...);
5095__attribute__((__cold__)) __attribute__((__format__(__printf__, (1), (2)))) __attribute__((__noreturn__)) void rb_bug(const char*, ...);
5096__attribute__((__noreturn__)) void rb_bug_errno(const char*, int);
5097__attribute__((__noreturn__)) void rb_sys_fail(const char*);
5098__attribute__((__noreturn__)) void rb_sys_fail_str(VALUE);
5099__attribute__((__noreturn__)) void rb_mod_sys_fail(VALUE, const char*);
5100__attribute__((__noreturn__)) void rb_mod_sys_fail_str(VALUE, VALUE);
5101__attribute__((__noreturn__)) void rb_readwrite_sys_fail(enum rb_io_wait_readwrite, const char*);
5102__attribute__((__noreturn__)) void rb_iter_break(void);
5103__attribute__((__noreturn__)) void rb_iter_break_value(VALUE);
5104__attribute__((__noreturn__)) void rb_exit(int);
5105__attribute__((__noreturn__)) void rb_notimplement(void);
5106VALUE rb_syserr_new(int, const char *);
5107VALUE rb_syserr_new_str(int n, VALUE arg);
5108__attribute__((__noreturn__)) void rb_syserr_fail(int, const char*);
5109__attribute__((__noreturn__)) void rb_syserr_fail_str(int, VALUE);
5110__attribute__((__noreturn__)) void rb_mod_syserr_fail(VALUE, int, const char*);
5111__attribute__((__noreturn__)) void rb_mod_syserr_fail_str(VALUE, int, VALUE);
5112__attribute__((__noreturn__)) void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite, int, const char*);
5113__attribute__((__noreturn__)) void rb_unexpected_type(VALUE,int);
5114VALUE *rb_ruby_verbose_ptr(void);
5115VALUE *rb_ruby_debug_ptr(void);
5116__attribute__((__format__(__printf__, (1), (2)))) void rb_warning(const char*, ...);
5117__attribute__((__format__(__printf__, (2), (3)))) void rb_category_warning(rb_warning_category_t, const char*, ...);
5118__attribute__((__format__(__printf__, (3), (4)))) void rb_compile_warning(const char *, int, const char*, ...);
5119__attribute__((__format__(__printf__, (4), (5)))) void rb_category_compile_warn(rb_warning_category_t, const char *, int, const char*, ...);
5120__attribute__((__format__(__printf__, (1), (2)))) void rb_sys_warning(const char*, ...);
5121__attribute__((__cold__)) __attribute__((__format__(__printf__, (1), (2)))) void rb_warn(const char*, ...);
5122__attribute__((__cold__)) __attribute__((__format__(__printf__, (2), (3)))) void rb_category_warn(rb_warning_category_t, const char*, ...);
5123__attribute__((__format__(__printf__, (3), (4)))) void rb_compile_warn(const char *, int, const char*, ...);
5124
5125
5126enum rbimpl_typeddata_flags {
5127 RUBY_TYPED_FREE_IMMEDIATELY = 1,
5128 RUBY_TYPED_FROZEN_SHAREABLE = RUBY_FL_SHAREABLE,
5129 RUBY_TYPED_WB_PROTECTED = RUBY_FL_WB_PROTECTED,
5130 RUBY_TYPED_PROMOTED1 = RUBY_FL_PROMOTED1
5131};
5132typedef struct rb_data_type_struct rb_data_type_t;
5133struct rb_data_type_struct {
5134 const char *wrap_struct_name;
5135 struct {
5138 size_t (*dsize)(const void *);
5140 void *reserved[1];
5141 } function;
5142 const rb_data_type_t *parent;
5143 void *data;
5144 VALUE flags;
5145};
5146struct RTypedData {
5147 struct RBasic basic;
5148 const rb_data_type_t *type;
5149 VALUE typed_flag;
5150 void *data;
5151};
5152
5153
5154VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *);
5155VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type);
5156int rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent);
5157int rb_typeddata_is_kind_of(VALUE obj, const rb_data_type_t *data_type);
5158void *rb_check_typeddata(VALUE obj, const rb_data_type_t *data_type);
5159
5160
5161__attribute__((__pure__))
5162__attribute__((__artificial__))
5163static inline _Bool
5164rbimpl_rtypeddata_p(VALUE obj)
5165{
5166 return ((struct RTypedData *)(obj))->typed_flag == 1;
5167}
5168__attribute__((__pure__))
5169__attribute__((__artificial__))
5170static inline _Bool
5171RTYPEDDATA_P(VALUE obj)
5172{
5173 return rbimpl_rtypeddata_p(obj);
5174}
5175__attribute__((__pure__))
5176__attribute__((__artificial__))
5177static inline const struct rb_data_type_struct *
5178RTYPEDDATA_TYPE(VALUE obj)
5179{
5180 return ((struct RTypedData *)(obj))->type;
5181}
5182static inline VALUE
5183rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size)
5184{
5185 VALUE result = rb_data_typed_object_zalloc(klass, size, type); (*datap) = ((void *)(((struct RTypedData *)(result))->data)); ((void)(*datap));
5186 return result;
5187}
5188__attribute__((__deprecated__ ("by: rb_data_typed_object_wrap")))
5189static inline VALUE
5190rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
5191{
5192 return rb_data_typed_object_wrap(klass, datap, type);
5193}
5194
5195enum
5196{
5197 _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),
5198 _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),
5199 _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),
5200 _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),
5201 _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),
5202 _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),
5203 _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),
5204 _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),
5205 _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),
5206 _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),
5207 _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),
5208 _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
5209};
5210extern const unsigned short int **__ctype_b_loc (void)
5211 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
5212extern const __int32_t **__ctype_tolower_loc (void)
5213 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
5214extern const __int32_t **__ctype_toupper_loc (void)
5215 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
5216extern int isalnum (int) __attribute__ ((__nothrow__ , __leaf__));
5217extern int isalpha (int) __attribute__ ((__nothrow__ , __leaf__));
5218extern int iscntrl (int) __attribute__ ((__nothrow__ , __leaf__));
5219extern int isdigit (int) __attribute__ ((__nothrow__ , __leaf__));
5220extern int islower (int) __attribute__ ((__nothrow__ , __leaf__));
5221extern int isgraph (int) __attribute__ ((__nothrow__ , __leaf__));
5222extern int isprint (int) __attribute__ ((__nothrow__ , __leaf__));
5223extern int ispunct (int) __attribute__ ((__nothrow__ , __leaf__));
5224extern int isspace (int) __attribute__ ((__nothrow__ , __leaf__));
5225extern int isupper (int) __attribute__ ((__nothrow__ , __leaf__));
5226extern int isxdigit (int) __attribute__ ((__nothrow__ , __leaf__));
5227extern int tolower (int __c) __attribute__ ((__nothrow__ , __leaf__));
5228extern int toupper (int __c) __attribute__ ((__nothrow__ , __leaf__));
5229extern int isblank (int) __attribute__ ((__nothrow__ , __leaf__));
5230extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__ , __leaf__));
5231extern int isascii (int __c) __attribute__ ((__nothrow__ , __leaf__));
5232extern int toascii (int __c) __attribute__ ((__nothrow__ , __leaf__));
5233extern int _toupper (int) __attribute__ ((__nothrow__ , __leaf__));
5234extern int _tolower (int) __attribute__ ((__nothrow__ , __leaf__));
5235extern __inline __attribute__ ((__gnu_inline__)) int
5236__attribute__ ((__nothrow__ , __leaf__)) tolower (int __c)
5237{
5238 return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c;
5239}
5240extern __inline __attribute__ ((__gnu_inline__)) int
5241__attribute__ ((__nothrow__ , __leaf__)) toupper (int __c)
5242{
5243 return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c;
5244}
5245extern int isalnum_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5246extern int isalpha_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5247extern int iscntrl_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5248extern int isdigit_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5249extern int islower_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5250extern int isgraph_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5251extern int isprint_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5252extern int ispunct_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5253extern int isspace_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5254extern int isupper_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5255extern int isxdigit_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5256extern int isblank_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5257extern int __tolower_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
5258extern int tolower_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
5259extern int __toupper_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
5260extern int toupper_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
5261
5262
5263
5264int rb_st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
5265int rb_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
5266unsigned long ruby_strtoul(const char *str, char **endptr, int base);
5267
5268
5269__attribute__((__const__))
5270
5271__attribute__((__artificial__))
5272static inline int
5273rb_isascii(int c)
5274{
5275 return '\0' <= c && c <= '\x7f';
5276}
5277__attribute__((__const__))
5278
5279__attribute__((__artificial__))
5280static inline int
5281rb_isupper(int c)
5282{
5283 return 'A' <= c && c <= 'Z';
5284}
5285__attribute__((__const__))
5286
5287__attribute__((__artificial__))
5288static inline int
5289rb_islower(int c)
5290{
5291 return 'a' <= c && c <= 'z';
5292}
5293__attribute__((__const__))
5294
5295__attribute__((__artificial__))
5296static inline int
5297rb_isalpha(int c)
5298{
5299 return rb_isupper(c) || rb_islower(c);
5300}
5301__attribute__((__const__))
5302
5303__attribute__((__artificial__))
5304static inline int
5305rb_isdigit(int c)
5306{
5307 return '0' <= c && c <= '9';
5308}
5309__attribute__((__const__))
5310
5311__attribute__((__artificial__))
5312static inline int
5313rb_isalnum(int c)
5314{
5315 return rb_isalpha(c) || rb_isdigit(c);
5316}
5317__attribute__((__const__))
5318
5319__attribute__((__artificial__))
5320static inline int
5321rb_isxdigit(int c)
5322{
5323 return rb_isdigit(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
5324}
5325__attribute__((__const__))
5326
5327__attribute__((__artificial__))
5328static inline int
5329rb_isblank(int c)
5330{
5331 return c == ' ' || c == '\t';
5332}
5333__attribute__((__const__))
5334
5335__attribute__((__artificial__))
5336static inline int
5337rb_isspace(int c)
5338{
5339 return c == ' ' || ('\t' <= c && c <= '\r');
5340}
5341__attribute__((__const__))
5342
5343__attribute__((__artificial__))
5344static inline int
5345rb_iscntrl(int c)
5346{
5347 return ('\0' <= c && c < ' ') || c == '\x7f';
5348}
5349__attribute__((__const__))
5350
5351__attribute__((__artificial__))
5352static inline int
5353rb_isprint(int c)
5354{
5355 return ' ' <= c && c <= '\x7e';
5356}
5357__attribute__((__const__))
5358
5359__attribute__((__artificial__))
5360static inline int
5361rb_ispunct(int c)
5362{
5363 return !rb_isalnum(c);
5364}
5365__attribute__((__const__))
5366
5367__attribute__((__artificial__))
5368static inline int
5369rb_isgraph(int c)
5370{
5371 return '!' <= c && c <= '\x7e';
5372}
5373__attribute__((__const__))
5374
5375__attribute__((__artificial__))
5376static inline int
5377rb_tolower(int c)
5378{
5379 return rb_isupper(c) ? (c|0x20) : c;
5380}
5381__attribute__((__const__))
5382
5383__attribute__((__artificial__))
5384static inline int
5385rb_toupper(int c)
5386{
5387 return rb_islower(c) ? (c&0x5f) : c;
5388}
5389
5390
5391VALUE rb_eval_string(const char*);
5392VALUE rb_eval_string_protect(const char*, int*);
5393VALUE rb_eval_string_wrap(const char*, int*);
5394VALUE rb_funcall(VALUE, ID, int, ...);
5395VALUE rb_funcallv(VALUE, ID, int, const VALUE*);
5396VALUE rb_funcallv_kw(VALUE, ID, int, const VALUE*, int);
5397VALUE rb_funcallv_public(VALUE, ID, int, const VALUE*);
5398VALUE rb_funcallv_public_kw(VALUE, ID, int, const VALUE*, int);
5399VALUE rb_funcall_passing_block(VALUE, ID, int, const VALUE*);
5400VALUE rb_funcall_passing_block_kw(VALUE, ID, int, const VALUE*, int);
5401VALUE rb_funcall_with_block(VALUE, ID, int, const VALUE*, VALUE);
5402VALUE rb_funcall_with_block_kw(VALUE, ID, int, const VALUE*, VALUE, int);
5403VALUE rb_call_super(int, const VALUE*);
5404VALUE rb_call_super_kw(int, const VALUE*, int);
5405VALUE rb_current_receiver(void);
5406int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *);
5407VALUE rb_extract_keywords(VALUE *orighash);
5408
5409
5410
5411
5412typedef uint32_t rb_event_flag_t;
5413typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass);
5414void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data);
5416
5417
5418
5419
5420void rb_gc_register_address(VALUE *valptr);
5421void rb_global_variable(VALUE *);
5422void rb_gc_unregister_address(VALUE *valptr);
5423void rb_gc_register_mark_object(VALUE object);
5424
5425
5426
5427
5428typedef int ruby_glob_func(const char*,VALUE, void*);
5429void rb_glob(const char*,void(*)(const char*,VALUE,void*),VALUE);
5430int ruby_glob(const char*,int,ruby_glob_func*,VALUE);
5431int ruby_brace_glob(const char*,int,ruby_glob_func*,VALUE);
5432
5433
5434
5435
5436extern VALUE rb_mKernel;
5437extern VALUE rb_mComparable;
5438extern VALUE rb_mEnumerable;
5439extern VALUE rb_mErrno;
5440extern VALUE rb_mFileTest;
5441extern VALUE rb_mGC;
5442extern VALUE rb_mMath;
5443extern VALUE rb_mProcess;
5444extern VALUE rb_mWaitReadable;
5445extern VALUE rb_mWaitWritable;
5446extern VALUE rb_cBasicObject;
5447extern VALUE rb_cObject;
5448extern VALUE rb_cArray;
5449extern VALUE rb_cBinding;
5450extern VALUE rb_cClass;
5451extern VALUE rb_cDir;
5452extern VALUE rb_cEncoding;
5453extern VALUE rb_cEnumerator;
5454extern VALUE rb_cFalseClass;
5455extern VALUE rb_cFile;
5456extern VALUE rb_cComplex;
5457extern VALUE rb_cFloat;
5458extern VALUE rb_cHash;
5459extern VALUE rb_cIO;
5460extern VALUE rb_cInteger;
5461extern VALUE rb_cMatch;
5462extern VALUE rb_cMethod;
5463extern VALUE rb_cModule;
5464extern VALUE rb_cNameErrorMesg;
5465extern VALUE rb_cNilClass;
5466extern VALUE rb_cNumeric;
5467extern VALUE rb_cProc;
5468extern VALUE rb_cRandom;
5469extern VALUE rb_cRange;
5470extern VALUE rb_cRational;
5471extern VALUE rb_cRegexp;
5472extern VALUE rb_cStat;
5473extern VALUE rb_cString;
5474extern VALUE rb_cStruct;
5475extern VALUE rb_cSymbol;
5476extern VALUE rb_cThread;
5477extern VALUE rb_cTime;
5478extern VALUE rb_cTrueClass;
5479extern VALUE rb_cUnboundMethod;
5480extern VALUE rb_eException;
5481extern VALUE rb_eStandardError;
5482extern VALUE rb_eSystemExit;
5483extern VALUE rb_eInterrupt;
5484extern VALUE rb_eSignal;
5485extern VALUE rb_eFatal;
5486extern VALUE rb_eArgError;
5487extern VALUE rb_eEOFError;
5488extern VALUE rb_eIndexError;
5489extern VALUE rb_eStopIteration;
5490extern VALUE rb_eKeyError;
5491extern VALUE rb_eRangeError;
5492extern VALUE rb_eIOError;
5493extern VALUE rb_eRuntimeError;
5494extern VALUE rb_eFrozenError;
5495extern VALUE rb_eSecurityError;
5496extern VALUE rb_eSystemCallError;
5497extern VALUE rb_eThreadError;
5498extern VALUE rb_eTypeError;
5499extern VALUE rb_eZeroDivError;
5500extern VALUE rb_eNotImpError;
5501extern VALUE rb_eNoMemError;
5502extern VALUE rb_eNoMethodError;
5503extern VALUE rb_eFloatDomainError;
5504extern VALUE rb_eLocalJumpError;
5505extern VALUE rb_eSysStackError;
5506extern VALUE rb_eRegexpError;
5507extern VALUE rb_eEncodingError;
5508extern VALUE rb_eEncCompatError;
5509extern VALUE rb_eNoMatchingPatternError;
5510extern VALUE rb_eScriptError;
5511extern VALUE rb_eNameError;
5512extern VALUE rb_eSyntaxError;
5513extern VALUE rb_eLoadError;
5514extern VALUE rb_eMathDomainError;
5516__attribute__((__pure__))
5517static inline VALUE
5518rb_class_of(VALUE obj)
5519{
5520 if (! RB_SPECIAL_CONST_P(obj)) {
5521 return RBASIC_CLASS(obj);
5522 }
5523 else if (obj == ((VALUE)RUBY_Qfalse)) {
5524 return rb_cFalseClass;
5525 }
5526 else if (obj == ((VALUE)RUBY_Qnil)) {
5527 return rb_cNilClass;
5528 }
5529 else if (obj == ((VALUE)RUBY_Qtrue)) {
5530 return rb_cTrueClass;
5531 }
5532 else if (RB_FIXNUM_P(obj)) {
5533 return rb_cInteger;
5534 }
5535 else if (RB_STATIC_SYM_P(obj)) {
5536 return rb_cSymbol;
5537 }
5538 else if (RB_FLONUM_P(obj)) {
5539 return rb_cFloat;
5540 }
5541 __builtin_unreachable();
5542}
5543
5544
5545
5546
5547void ruby_sysinit(int *argc, char ***argv);
5548void ruby_init(void);
5549void* ruby_options(int argc, char** argv);
5550int ruby_executable_node(void *n, int *status);
5551int ruby_run_node(void *n);
5552void ruby_show_version(void);
5553void ruby_show_copyright(void);
5554void ruby_init_stack(volatile VALUE*);
5555int ruby_setup(void);
5556int ruby_cleanup(volatile int);
5557void ruby_finalize(void);
5558__attribute__((__noreturn__))
5559void ruby_stop(int);
5560int ruby_stack_check(void);
5561size_t ruby_stack_length(VALUE**);
5562int ruby_exec_node(void *n);
5563void ruby_script(const char* name);
5564void ruby_set_script_name(VALUE name);
5565void ruby_prog_init(void);
5566void ruby_set_argv(int, char**);
5567void *ruby_process_options(int, char**);
5568void ruby_init_loadpath(void);
5569void ruby_incpush(const char*);
5570void ruby_sig_finalize(void);
5571
5572
5573
5574
5575typedef VALUE rb_block_call_func(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg);
5577VALUE rb_each(VALUE);
5578VALUE rb_yield(VALUE);
5579VALUE rb_yield_values(int n, ...);
5580VALUE rb_yield_values2(int n, const VALUE *argv);
5581VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat);
5582VALUE rb_yield_splat(VALUE);
5583VALUE rb_yield_splat_kw(VALUE, int);
5584VALUE rb_yield_block(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg);
5585int rb_keyword_given_p(void);
5586int rb_block_given_p(void);
5587void rb_need_block(void);
5588VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE);
5589VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE);
5590VALUE rb_block_call_kw(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE,int);
5591VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE);
5592VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...);
5593VALUE rb_vrescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,va_list);
5594VALUE rb_ensure(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE),VALUE);
5595VALUE rb_catch(const char*,rb_block_call_func_t,VALUE);
5596VALUE rb_catch_obj(VALUE,rb_block_call_func_t,VALUE);
5597__attribute__((__noreturn__))
5598void rb_throw(const char*,VALUE);
5599__attribute__((__noreturn__))
5600void rb_throw_obj(VALUE,VALUE);
5601
5602
5604 _Bool left;
5605 size_t right;
5606};
5607
5608
5609__attribute__((__malloc__))
5610__attribute__((__returns_nonnull__))
5611__attribute__((__alloc_size__ (2)))
5612void *rb_alloc_tmp_buffer(volatile VALUE *store, long len);
5613__attribute__((__malloc__))
5614__attribute__((__returns_nonnull__))
5615__attribute__((__alloc_size__ (2,3)))
5616void *rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t len,size_t count);
5617void rb_free_tmp_buffer(volatile VALUE *store);
5618__attribute__((__noreturn__))
5619void ruby_malloc_size_overflow(size_t, size_t);
5620
5621
5622static inline int
5623rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
5624{
5625 __extension__ unsigned __int128 da, db, c2;
5626 da = a;
5627 db = b;
5628 c2 = da * db;
5629 if (c2 > max) return 1;
5630 *c = ((size_t)c2);
5631 return 0;
5632}
5633
5634__attribute__((__const__))
5635static inline struct rbimpl_size_mul_overflow_tag
5636rbimpl_size_mul_overflow(size_t x, size_t y)
5637{
5638 struct rbimpl_size_mul_overflow_tag ret = { 0, 0, };
5639 ret.left = __builtin_mul_overflow(x, y, &ret.right);
5640 return ret;
5641}
5642static inline size_t
5643rbimpl_size_mul_or_raise(size_t x, size_t y)
5644{
5645 struct rbimpl_size_mul_overflow_tag size =
5646 rbimpl_size_mul_overflow(x, y);
5647 if ((__builtin_expect(!!(! size.left), 1))) {
5648 return size.right;
5649 }
5650 else {
5651 ruby_malloc_size_overflow(x, y);
5652 __builtin_unreachable();
5653 }
5654}
5655static inline void *
5656rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize)
5657{
5658 const size_t total_size = rbimpl_size_mul_or_raise(count, elsize);
5659 const size_t cnt = (total_size + sizeof(VALUE) - 1) / sizeof(VALUE);
5660 return rb_alloc_tmp_buffer_with_count(store, total_size, cnt);
5661}
5662
5663__attribute__((__nonnull__ (1)))
5664__attribute__((__returns_nonnull__))
5665static inline void *
5666ruby_nonempty_memcpy(void *dest, const void *src, size_t n)
5667{
5668 if (n) {
5669 return memcpy(dest, src, n);
5670 }
5671 else {
5672 return dest;
5673 }
5674}
5675
5676
5677VALUE rb_define_class(const char*,VALUE);
5678VALUE rb_define_module(const char*);
5679VALUE rb_define_class_under(VALUE, const char*, VALUE);
5680VALUE rb_define_module_under(VALUE, const char*);
5681void rb_include_module(VALUE,VALUE);
5682void rb_extend_object(VALUE,VALUE);
5683void rb_prepend_module(VALUE,VALUE);
5684
5685
5686
5687
5688VALUE rb_newobj(void);
5689VALUE rb_newobj_of(VALUE, VALUE);
5690VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type);
5691VALUE rb_obj_class(VALUE);
5692VALUE rb_singleton_class_clone(VALUE);
5693void rb_singleton_class_attached(VALUE,VALUE);
5694void rb_copy_generic_ivar(VALUE,VALUE);
5695
5696
5697static inline void
5698rb_clone_setup(VALUE clone, VALUE obj)
5699{
5700 ((void)0);
5701 ((void)0);
5703 rb_obj_setup(clone, rb_singleton_class_clone(obj),
5704 RB_FL_TEST_RAW(obj, ~flags));
5705 rb_singleton_class_attached(RBASIC_CLASS(clone), clone);
5706 if (RB_FL_TEST(obj, RUBY_FL_EXIVAR)) rb_copy_generic_ivar(clone, obj);
5707}
5708static inline void
5709rb_dup_setup(VALUE dup, VALUE obj)
5710{
5711 ((void)0);
5712 ((void)0);
5713 rb_obj_setup(dup, rb_obj_class(obj), RB_FL_TEST_RAW(obj, RUBY_FL_DUPPED));
5714 if (RB_FL_TEST(obj, RUBY_FL_EXIVAR)) rb_copy_generic_ivar(dup, obj);
5715}
5716
5717
5718void rb_mem_clear(VALUE*, long);
5719VALUE rb_assoc_new(VALUE, VALUE);
5720VALUE rb_check_array_type(VALUE);
5721VALUE rb_ary_new(void);
5722VALUE rb_ary_new_capa(long capa);
5723VALUE rb_ary_new_from_args(long n, ...);
5724VALUE rb_ary_new_from_values(long n, const VALUE *elts);
5725VALUE rb_ary_tmp_new(long);
5726void rb_ary_free(VALUE);
5727void rb_ary_modify(VALUE);
5728VALUE rb_ary_freeze(VALUE);
5729VALUE rb_ary_shared_with_p(VALUE, VALUE);
5730VALUE rb_ary_aref(int, const VALUE*, VALUE);
5731VALUE rb_ary_subseq(VALUE, long, long);
5732void rb_ary_store(VALUE, long, VALUE);
5733VALUE rb_ary_dup(VALUE);
5734VALUE rb_ary_resurrect(VALUE ary);
5735VALUE rb_ary_to_ary(VALUE);
5736VALUE rb_ary_to_s(VALUE);
5737VALUE rb_ary_cat(VALUE, const VALUE *, long);
5738VALUE rb_ary_push(VALUE, VALUE);
5739VALUE rb_ary_pop(VALUE);
5740VALUE rb_ary_shift(VALUE);
5741VALUE rb_ary_unshift(VALUE, VALUE);
5742VALUE rb_ary_entry(VALUE, long);
5743VALUE rb_ary_each(VALUE);
5744VALUE rb_ary_join(VALUE, VALUE);
5745VALUE rb_ary_reverse(VALUE);
5746VALUE rb_ary_rotate(VALUE, long);
5747VALUE rb_ary_sort(VALUE);
5748VALUE rb_ary_sort_bang(VALUE);
5749VALUE rb_ary_delete(VALUE, VALUE);
5750VALUE rb_ary_delete_at(VALUE, long);
5751VALUE rb_ary_clear(VALUE);
5752VALUE rb_ary_plus(VALUE, VALUE);
5753VALUE rb_ary_concat(VALUE, VALUE);
5754VALUE rb_ary_assoc(VALUE, VALUE);
5755VALUE rb_ary_rassoc(VALUE, VALUE);
5756VALUE rb_ary_includes(VALUE, VALUE);
5757VALUE rb_ary_cmp(VALUE, VALUE);
5758VALUE rb_ary_replace(VALUE copy, VALUE orig);
5759VALUE rb_get_values_at(VALUE, long, int, const VALUE*, VALUE(*)(VALUE,long));
5760VALUE rb_ary_resize(VALUE ary, long len);
5761
5762
5763
5764
5765VALUE rb_exc_new(VALUE, const char*, long);
5766VALUE rb_exc_new_cstr(VALUE, const char*);
5767VALUE rb_exc_new_str(VALUE, VALUE);
5768__attribute__((__format__(__printf__, (1), (2)))) __attribute__((__noreturn__)) void rb_loaderror(const char*, ...);
5769__attribute__((__format__(__printf__, (2), (3)))) __attribute__((__noreturn__)) void rb_loaderror_with_path(VALUE path, const char*, ...);
5770__attribute__((__format__(__printf__, (2), (3)))) __attribute__((__noreturn__)) void rb_name_error(ID, const char*, ...);
5771__attribute__((__format__(__printf__, (2), (3)))) __attribute__((__noreturn__)) void rb_name_error_str(VALUE, const char*, ...);
5772__attribute__((__format__(__printf__, (2), (3)))) __attribute__((__noreturn__)) void rb_frozen_error_raise(VALUE, const char*, ...);
5773__attribute__((__noreturn__)) void rb_invalid_str(const char*, const char*);
5774__attribute__((__noreturn__)) void rb_error_frozen(const char*);
5775__attribute__((__noreturn__)) void rb_error_frozen_object(VALUE);
5776void rb_error_untrusted(VALUE);
5777void rb_check_frozen(VALUE);
5778void rb_check_trusted(VALUE);
5779void rb_check_copyable(VALUE obj, VALUE orig);
5780__attribute__((__noreturn__)) static void rb_error_arity(int, int, int);
5781
5782
5783static inline void
5784rb_check_frozen_inline(VALUE obj)
5785{
5786 if ((__builtin_expect(!!(RB_OBJ_FROZEN(obj)), 0))) {
5788 }
5789}
5790static inline int
5791rb_check_arity(int argc, int min, int max)
5792{
5793 if ((argc < min) || (max != (-1) && argc > max))
5794 rb_error_arity(argc, min, max);
5795 return argc;
5796}
5797
5798
5799void rb_st_foreach_safe(struct st_table *, int (*)(st_data_t, st_data_t, st_data_t), st_data_t);
5800VALUE rb_check_hash_type(VALUE);
5801void rb_hash_foreach(VALUE, int (*)(VALUE, VALUE, VALUE), VALUE);
5802VALUE rb_hash(VALUE);
5803VALUE rb_hash_new(void);
5804VALUE rb_hash_dup(VALUE);
5805VALUE rb_hash_freeze(VALUE);
5806VALUE rb_hash_aref(VALUE, VALUE);
5807VALUE rb_hash_lookup(VALUE, VALUE);
5808VALUE rb_hash_lookup2(VALUE, VALUE, VALUE);
5809VALUE rb_hash_fetch(VALUE, VALUE);
5810VALUE rb_hash_aset(VALUE, VALUE, VALUE);
5811VALUE rb_hash_clear(VALUE);
5812VALUE rb_hash_delete_if(VALUE);
5813VALUE rb_hash_delete(VALUE,VALUE);
5814VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone);
5815void rb_hash_bulk_insert(long, const VALUE *, VALUE);
5816typedef VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value);
5817VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func);
5818struct st_table *rb_hash_tbl(VALUE, const char *file, int line);
5819int rb_path_check(const char*);
5820int rb_env_path_tainted(void);
5821VALUE rb_env_clear(void);
5822VALUE rb_hash_size(VALUE);
5823void rb_hash_free(VALUE);
5824
5825
5826
5827
5828VALUE rb_block_proc(void);
5829VALUE rb_block_lambda(void);
5830VALUE rb_proc_new(rb_block_call_func_t, VALUE);
5831VALUE rb_obj_is_proc(VALUE);
5832VALUE rb_proc_call(VALUE, VALUE);
5833VALUE rb_proc_call_kw(VALUE, VALUE, int);
5834VALUE rb_proc_call_with_block(VALUE, int argc, const VALUE *argv, VALUE);
5835VALUE rb_proc_call_with_block_kw(VALUE, int argc, const VALUE *argv, VALUE, int);
5836int rb_proc_arity(VALUE);
5837VALUE rb_proc_lambda_p(VALUE);
5838VALUE rb_binding_new(void);
5839VALUE rb_obj_method(VALUE, VALUE);
5840VALUE rb_obj_is_method(VALUE);
5841VALUE rb_method_call(int, const VALUE*, VALUE);
5842VALUE rb_method_call_kw(int, const VALUE*, VALUE, int);
5843VALUE rb_method_call_with_block(int, const VALUE *, VALUE, VALUE);
5844VALUE rb_method_call_with_block_kw(int, const VALUE *, VALUE, VALUE, int);
5845int rb_mod_method_arity(VALUE, ID);
5846int rb_obj_method_arity(VALUE, ID);
5847VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
5848
5849
5850
5851
5852int rb_scan_args(int, const VALUE*, const char*, ...);
5853int rb_scan_args_kw(int, int, const VALUE*, const char*, ...);
5854__attribute__((__error__ ("bad scan arg format")))
5855void rb_scan_args_bad_format(const char*);
5856__attribute__((__error__ ("variable argument length doesn't match")))
5857void rb_scan_args_length_mismatch(const char*,int);
5858
5859
5860static inline _Bool
5861rb_scan_args_keyword_p(int kw_flag, VALUE last)
5862{
5863 switch (kw_flag) {
5864 case 0:
5865 return !! rb_keyword_given_p();
5866 case 1:
5867 return 1;
5868 case 3:
5869 return RB_TYPE_P(last, RUBY_T_HASH);
5870 default:
5871 return 0;
5872 }
5873}
5874__attribute__((__always_inline__)) inline
5875static _Bool
5876rb_scan_args_lead_p(const char *fmt)
5877{
5878 return (((unsigned char)((fmt[0])-'0'))<10);
5879}
5880__attribute__((__always_inline__)) inline
5881static int
5882rb_scan_args_n_lead(const char *fmt)
5883{
5884 return (rb_scan_args_lead_p(fmt) ? fmt[0]-'0' : 0);
5885}
5886__attribute__((__always_inline__)) inline
5887static _Bool
5888rb_scan_args_opt_p(const char *fmt)
5889{
5890 return (rb_scan_args_lead_p(fmt) && (((unsigned char)((fmt[1])-'0'))<10));
5891}
5892__attribute__((__always_inline__)) inline
5893static int
5894rb_scan_args_n_opt(const char *fmt)
5895{
5896 return (rb_scan_args_opt_p(fmt) ? fmt[1]-'0' : 0);
5897}
5898__attribute__((__always_inline__)) inline
5899static int
5900rb_scan_args_var_idx(const char *fmt)
5901{
5902 return (!rb_scan_args_lead_p(fmt) ? 0 : !(((unsigned char)((fmt[1])-'0'))<10) ? 1 : 2);
5903}
5904__attribute__((__always_inline__)) inline
5905static _Bool
5906rb_scan_args_f_var(const char *fmt)
5907{
5908 return (fmt[rb_scan_args_var_idx(fmt)]=='*');
5909}
5910__attribute__((__always_inline__)) inline
5911static int
5912rb_scan_args_trail_idx(const char *fmt)
5913{
5914 const int idx = rb_scan_args_var_idx(fmt);
5915 return idx+(fmt[idx]=='*');
5916}
5917__attribute__((__always_inline__)) inline
5918static int
5919rb_scan_args_n_trail(const char *fmt)
5920{
5921 const int idx = rb_scan_args_trail_idx(fmt);
5922 return ((((unsigned char)((fmt[idx])-'0'))<10) ? fmt[idx]-'0' : 0);
5923}
5924__attribute__((__always_inline__)) inline
5925static int
5926rb_scan_args_hash_idx(const char *fmt)
5927{
5928 const int idx = rb_scan_args_trail_idx(fmt);
5929 return idx+(((unsigned char)((fmt[idx])-'0'))<10);
5930}
5931__attribute__((__always_inline__)) inline
5932static _Bool
5933rb_scan_args_f_hash(const char *fmt)
5934{
5935 return (fmt[rb_scan_args_hash_idx(fmt)]==':');
5936}
5937__attribute__((__always_inline__)) inline
5938static int
5939rb_scan_args_block_idx(const char *fmt)
5940{
5941 const int idx = rb_scan_args_hash_idx(fmt);
5942 return idx+(fmt[idx]==':');
5943}
5944__attribute__((__always_inline__)) inline
5945static _Bool
5946rb_scan_args_f_block(const char *fmt)
5947{
5948 return (fmt[rb_scan_args_block_idx(fmt)]=='&');
5949}
5950__attribute__((__always_inline__)) inline
5951static int
5952rb_scan_args_set(int kw_flag, int argc, const VALUE *argv,
5953 int n_lead, int n_opt, int n_trail,
5954 _Bool f_var, _Bool f_hash, _Bool f_block,
5955 VALUE *vars[], const char *fmt [[maybe_unused]], int varc [[maybe_unused]])
5956
5957
5958{
5959 int i, argi = 0, vari = 0;
5960 VALUE *var, hash = ((VALUE)RUBY_Qnil);
5961 const int n_mand = n_lead + n_trail;
5962 if (f_hash && argc > 0) {
5963 VALUE last = argv[argc - 1];
5964 if (rb_scan_args_keyword_p(kw_flag, last)) {
5965 hash = rb_hash_dup(last);
5966 argc--;
5967 }
5968 }
5969 if (argc < n_mand) {
5970 goto argc_error;
5971 }
5972 for (i = 0; i < n_lead; i++) {
5973 var = vars[vari++];
5974 if (var) *var = argv[argi];
5975 argi++;
5976 }
5977 for (i = 0; i < n_opt; i++) {
5978 var = vars[vari++];
5979 if (argi < argc - n_trail) {
5980 if (var) *var = argv[argi];
5981 argi++;
5982 }
5983 else {
5984 if (var) *var = ((VALUE)RUBY_Qnil);
5985 }
5986 }
5987 if (f_var) {
5988 int n_var = argc - argi - n_trail;
5989 var = vars[vari++];
5990 if (0 < n_var) {
5991 if (var) *var = rb_ary_new_from_values(n_var, &argv[argi]);
5992 argi += n_var;
5993 }
5994 else {
5995 if (var) *var = rb_ary_new();
5996 }
5997 }
5998 for (i = 0; i < n_trail; i++) {
5999 var = vars[vari++];
6000 if (var) *var = argv[argi];
6001 argi++;
6002 }
6003 if (f_hash) {
6004 var = vars[vari++];
6005 if (var) *var = hash;
6006 }
6007 if (f_block) {
6008 var = vars[vari++];
6009 if (rb_block_given_p()) {
6010 *var = rb_block_proc();
6011 }
6012 else {
6013 *var = ((VALUE)RUBY_Qnil);
6014 }
6015 }
6016 if (argi == argc) {
6017 return argc;
6018 }
6019 argc_error:
6020 rb_error_arity(argc, n_mand, f_var ? (-1) : n_mand + n_opt);
6021 __builtin_unreachable();
6022}
6023
6024
6025ID rb_sym2id(VALUE);
6026VALUE rb_id2sym(ID);
6027ID rb_intern(const char*);
6028ID rb_intern2(const char*, long);
6029ID rb_intern_str(VALUE str);
6030const char *rb_id2name(ID);
6031ID rb_check_id(volatile VALUE *);
6032ID rb_to_id(VALUE);
6033VALUE rb_id2str(ID);
6034VALUE rb_sym2str(VALUE);
6035VALUE rb_to_symbol(VALUE name);
6036VALUE rb_check_symbol(volatile VALUE *namep);
6037
6038
6039__attribute__((__pure__))
6040__attribute__((__nonnull__ ()))
6041static inline ID
6042rb_intern_const(const char *str)
6043{
6044 size_t len = strlen(str);
6045 return rb_intern2(str, ((long)len));
6046}
6047
6048__attribute__((__nonnull__ ()))
6049static inline ID
6050rbimpl_intern_const(ID *ptr, const char *str)
6051{
6052 while (! *ptr) {
6053 *ptr = rb_intern_const(str);
6054 }
6055 return *ptr;
6056}
6057
6058
6059typedef VALUE rb_gvar_getter_t(ID id, VALUE *data);
6060typedef void rb_gvar_setter_t(VALUE val, ID id, VALUE *data);
6061typedef void rb_gvar_marker_t(VALUE *var);
6071__attribute__((__noreturn__))
6073void rb_define_variable(const char*,VALUE*);
6076void rb_define_readonly_variable(const char*,const VALUE*);
6077void rb_define_const(VALUE,const char*,VALUE);
6078void rb_define_global_const(const char*,VALUE);
6079VALUE rb_gv_set(const char*, VALUE);
6080VALUE rb_gv_get(const char*);
6081VALUE rb_iv_get(VALUE, const char*);
6082VALUE rb_iv_set(VALUE, const char*, VALUE);
6083
6084
6085
6086
6087VALUE rb_get_path(VALUE);
6088VALUE rb_get_path_no_checksafe(VALUE);
6089__attribute__((__error__ (" argument length doesn't match"))) int rb_varargs_bad_length(int,int);
6090const char *rb_class2name(VALUE);
6091const char *rb_obj_classname(VALUE);
6092void rb_p(VALUE);
6093VALUE rb_equal(VALUE,VALUE);
6094VALUE rb_require(const char*);
6095
6096
6097VALUE rb_big_new(size_t, int);
6098int rb_bigzero_p(VALUE x);
6099VALUE rb_big_clone(VALUE);
6100void rb_big_2comp(VALUE);
6101VALUE rb_big_norm(VALUE);
6102void rb_big_resize(VALUE big, size_t len);
6103VALUE rb_cstr_to_inum(const char*, int, int);
6104VALUE rb_str_to_inum(VALUE, int, int);
6105VALUE rb_cstr2inum(const char*, int);
6106VALUE rb_str2inum(VALUE, int);
6107VALUE rb_big2str(VALUE, int);
6108long rb_big2long(VALUE);
6109unsigned long rb_big2ulong(VALUE);
6110long long rb_big2ll(VALUE);
6111unsigned long long rb_big2ull(VALUE);
6112void rb_big_pack(VALUE val, unsigned long *buf, long num_longs);
6113VALUE rb_big_unpack(unsigned long *buf, long num_longs);
6114int rb_uv_to_utf8(char[6],unsigned long);
6115VALUE rb_dbl2big(double);
6116double rb_big2dbl(VALUE);
6117VALUE rb_big_cmp(VALUE, VALUE);
6118VALUE rb_big_eq(VALUE, VALUE);
6119VALUE rb_big_eql(VALUE, VALUE);
6120VALUE rb_big_plus(VALUE, VALUE);
6121VALUE rb_big_minus(VALUE, VALUE);
6122VALUE rb_big_mul(VALUE, VALUE);
6123VALUE rb_big_div(VALUE, VALUE);
6124VALUE rb_big_idiv(VALUE, VALUE);
6125VALUE rb_big_modulo(VALUE, VALUE);
6126VALUE rb_big_divmod(VALUE, VALUE);
6127VALUE rb_big_pow(VALUE, VALUE);
6128VALUE rb_big_and(VALUE, VALUE);
6129VALUE rb_big_or(VALUE, VALUE);
6130VALUE rb_big_xor(VALUE, VALUE);
6131VALUE rb_big_lshift(VALUE, VALUE);
6132VALUE rb_big_rshift(VALUE, VALUE);
6133int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
6134VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
6135size_t rb_absint_size(VALUE val, int *nlz_bits_ret);
6136size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret);
6137int rb_absint_singlebit_p(VALUE val);
6138
6139
6140
6141
6142int rb_cmpint(VALUE, VALUE, VALUE);
6143__attribute__((__noreturn__)) void rb_cmperr(VALUE, VALUE);
6144
6145
6146
6147
6148VALUE rb_complex_raw(VALUE, VALUE);
6149VALUE rb_complex_new(VALUE, VALUE);
6150VALUE rb_complex_new_polar(VALUE abs, VALUE arg);
6151__attribute__((__deprecated__ ("by: " "rb_complex_new_polar"))) VALUE rb_complex_polar(VALUE abs, VALUE arg);
6152VALUE rb_complex_real(VALUE z);
6153VALUE rb_complex_imag(VALUE z);
6154VALUE rb_complex_plus(VALUE x, VALUE y);
6155VALUE rb_complex_minus(VALUE x, VALUE y);
6156VALUE rb_complex_mul(VALUE x, VALUE y);
6157VALUE rb_complex_div(VALUE x, VALUE y);
6158VALUE rb_complex_uminus(VALUE z);
6159VALUE rb_complex_conjugate(VALUE z);
6160VALUE rb_complex_abs(VALUE z);
6161VALUE rb_complex_arg(VALUE z);
6162VALUE rb_complex_pow(VALUE base, VALUE exp);
6163VALUE rb_dbl_complex_new(double real, double imag);
6164VALUE rb_Complex(VALUE, VALUE);
6165
6166
6167
6168
6169VALUE rb_fiber_new(rb_block_call_func_t, VALUE);
6170VALUE rb_fiber_new_kw(rb_block_call_func_t, VALUE, int kw_splat);
6171VALUE rb_fiber_resume(VALUE fib, int argc, const VALUE *argv);
6172VALUE rb_fiber_resume_kw(VALUE fib, int argc, const VALUE *argv, int kw_splat);
6173VALUE rb_fiber_yield(int argc, const VALUE *argv);
6174VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat);
6175VALUE rb_fiber_current(void);
6176VALUE rb_fiber_alive_p(VALUE);
6177
6178
6179
6180
6181VALUE rb_dir_getwd(void);
6182
6183
6184
6185
6186VALUE rb_enum_values_pack(int, const VALUE*);
6187
6188
6189
6190
6191__attribute__((__noreturn__))
6192void rb_exc_raise(VALUE);
6193__attribute__((__noreturn__))
6194void rb_exc_fatal(VALUE);
6195__attribute__((__noreturn__))
6196VALUE rb_f_exit(int, const VALUE*);
6197__attribute__((__noreturn__))
6198VALUE rb_f_abort(int, const VALUE*);
6199__attribute__((__noreturn__))
6200void rb_interrupt(void);
6201ID rb_frame_this_func(void);
6202__attribute__((__noreturn__))
6203void rb_jump_tag(int);
6204void rb_obj_call_init(VALUE, int, const VALUE*);
6205void rb_obj_call_init_kw(VALUE, int, const VALUE*, int);
6206VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
6207ID rb_frame_callee(void);
6208VALUE rb_make_exception(int, const VALUE*);
6209void rb_set_end_proc(void (*)(VALUE), VALUE);
6210
6211
6212
6213
6214typedef VALUE rb_enumerator_size_func(VALUE, VALUE, VALUE);
6215typedef struct {
6216 VALUE begin;
6217 VALUE end;
6218 VALUE step;
6219 int exclude_end;
6221VALUE rb_enumeratorize(VALUE, VALUE, int, const VALUE *);
6222VALUE rb_enumeratorize_with_size(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *);
6223VALUE rb_enumeratorize_with_size_kw(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *, int);
6225VALUE rb_arithmetic_sequence_beg_len_step(VALUE, long *begp, long *lenp, long *stepp, long len, int err);
6226
6227
6228
6229
6230VALUE rb_file_s_expand_path(int, const VALUE *);
6231VALUE rb_file_expand_path(VALUE, VALUE);
6232VALUE rb_file_s_absolute_path(int, const VALUE *);
6233VALUE rb_file_absolute_path(VALUE, VALUE);
6234VALUE rb_file_dirname(VALUE fname);
6235int rb_find_file_ext(VALUE*, const char* const*);
6236VALUE rb_find_file(VALUE);
6237VALUE rb_file_directory_p(VALUE,VALUE);
6238VALUE rb_str_encode_ospath(VALUE);
6239int rb_is_absolute_path(const char *);
6240
6241
6242
6243
6244__attribute__((__cold__)) __attribute__((__noreturn__)) void rb_memerror(void);
6245__attribute__((__pure__)) int rb_during_gc(void);
6246void rb_gc_mark_locations(const VALUE*, const VALUE*);
6247void rb_mark_tbl(struct st_table*);
6248void rb_mark_tbl_no_pin(struct st_table*);
6249void rb_mark_set(struct st_table*);
6250void rb_mark_hash(struct st_table*);
6252void rb_gc_mark_maybe(VALUE);
6253void rb_gc_mark(VALUE);
6254void rb_gc_mark_movable(VALUE);
6255VALUE rb_gc_location(VALUE);
6256void rb_gc_force_recycle(VALUE);
6257void rb_gc(void);
6258void rb_gc_copy_finalizer(VALUE,VALUE);
6259VALUE rb_gc_enable(void);
6260VALUE rb_gc_disable(void);
6261VALUE rb_gc_start(void);
6262VALUE rb_define_finalizer(VALUE, VALUE);
6263VALUE rb_undefine_finalizer(VALUE);
6264size_t rb_gc_count(void);
6265size_t rb_gc_stat(VALUE);
6266VALUE rb_gc_latest_gc_info(VALUE);
6267void rb_gc_adjust_memory_usage(ssize_t);
6268
6269
6270
6271
6272extern VALUE rb_fs;
6273extern VALUE rb_output_fs;
6274extern VALUE rb_rs;
6275extern VALUE rb_default_rs;
6276extern VALUE rb_output_rs;
6277VALUE rb_io_write(VALUE, VALUE);
6278VALUE rb_io_gets(VALUE);
6279VALUE rb_io_getbyte(VALUE);
6280VALUE rb_io_ungetc(VALUE, VALUE);
6281VALUE rb_io_ungetbyte(VALUE, VALUE);
6282VALUE rb_io_close(VALUE);
6283VALUE rb_io_flush(VALUE);
6284VALUE rb_io_eof(VALUE);
6285VALUE rb_io_binmode(VALUE);
6286VALUE rb_io_ascii8bit_binmode(VALUE);
6287VALUE rb_io_addstr(VALUE, VALUE);
6288VALUE rb_io_printf(int, const VALUE*, VALUE);
6289VALUE rb_io_print(int, const VALUE*, VALUE);
6290VALUE rb_io_puts(int, const VALUE*, VALUE);
6291VALUE rb_io_fdopen(int, int, const char*);
6292VALUE rb_io_get_io(VALUE);
6293VALUE rb_file_open(const char*, const char*);
6294VALUE rb_file_open_str(VALUE, const char*);
6295VALUE rb_gets(void);
6296void rb_write_error(const char*);
6297void rb_write_error2(const char*, long);
6298void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds);
6299int rb_pipe(int *pipes);
6300int rb_reserved_fd_p(int fd);
6301int rb_cloexec_open(const char *pathname, int flags, mode_t mode);
6302int rb_cloexec_dup(int oldfd);
6303int rb_cloexec_dup2(int oldfd, int newfd);
6304int rb_cloexec_pipe(int fildes[2]);
6305int rb_cloexec_fcntl_dupfd(int fd, int minfd);
6306void rb_update_max_fd(int fd);
6307void rb_fd_fix_cloexec(int fd);
6308
6309
6310
6311
6312void rb_load(VALUE, int);
6313void rb_load_protect(VALUE, int, int*);
6314int rb_provided(const char*);
6315int rb_feature_provided(const char *, const char **);
6316void rb_provide(const char*);
6317VALUE rb_f_require(VALUE, VALUE);
6318VALUE rb_require_string(VALUE);
6319void rb_ext_ractor_safe(_Bool flag);
6320
6321
6322
6323
6324VALUE rb_marshal_dump(VALUE, VALUE);
6325VALUE rb_marshal_load(VALUE);
6326void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE (*dumper)(VALUE), VALUE (*loader)(VALUE, VALUE));
6327
6328
6329
6330
6331__attribute__((__noreturn__)) void rb_num_zerodiv(void);
6332VALUE rb_num_coerce_bin(VALUE, VALUE, ID);
6333VALUE rb_num_coerce_cmp(VALUE, VALUE, ID);
6334VALUE rb_num_coerce_relop(VALUE, VALUE, ID);
6335VALUE rb_num_coerce_bit(VALUE, VALUE, ID);
6336VALUE rb_num2fix(VALUE);
6337VALUE rb_fix2str(VALUE, int);
6338__attribute__((__const__)) VALUE rb_dbl_cmp(double, double);
6339
6340
6341
6342
6343VALUE rb_class_new_instance_pass_kw(int, const VALUE *, VALUE);
6344VALUE rb_class_new_instance(int, const VALUE*, VALUE);
6345VALUE rb_class_new_instance_kw(int, const VALUE*, VALUE, int);
6346int rb_eql(VALUE, VALUE);
6347VALUE rb_any_to_s(VALUE);
6348VALUE rb_inspect(VALUE);
6349VALUE rb_obj_is_instance_of(VALUE, VALUE);
6350VALUE rb_obj_is_kind_of(VALUE, VALUE);
6351VALUE rb_obj_alloc(VALUE);
6352VALUE rb_obj_clone(VALUE);
6353VALUE rb_obj_dup(VALUE);
6354VALUE rb_obj_init_copy(VALUE,VALUE);
6355VALUE rb_obj_taint(VALUE);
6356__attribute__((__pure__))
6357VALUE rb_obj_tainted(VALUE);
6358VALUE rb_obj_untaint(VALUE);
6359VALUE rb_obj_untrust(VALUE);
6360__attribute__((__pure__))
6361VALUE rb_obj_untrusted(VALUE);
6362VALUE rb_obj_trust(VALUE);
6363VALUE rb_obj_freeze(VALUE);
6364__attribute__((__pure__))
6365VALUE rb_obj_frozen_p(VALUE);
6366VALUE rb_obj_id(VALUE);
6367VALUE rb_memory_id(VALUE);
6368VALUE rb_obj_class(VALUE);
6369__attribute__((__pure__))
6370VALUE rb_class_real(VALUE);
6371__attribute__((__pure__))
6372VALUE rb_class_inherited_p(VALUE, VALUE);
6373VALUE rb_class_superclass(VALUE);
6374VALUE rb_class_get_superclass(VALUE);
6375VALUE rb_convert_type(VALUE,int,const char*,const char*);
6376VALUE rb_check_convert_type(VALUE,int,const char*,const char*);
6377VALUE rb_check_to_integer(VALUE, const char *);
6378VALUE rb_check_to_float(VALUE);
6379VALUE rb_to_int(VALUE);
6380VALUE rb_check_to_int(VALUE);
6381VALUE rb_Integer(VALUE);
6382VALUE rb_to_float(VALUE);
6383VALUE rb_Float(VALUE);
6384VALUE rb_String(VALUE);
6385VALUE rb_Array(VALUE);
6386VALUE rb_Hash(VALUE);
6387double rb_cstr_to_dbl(const char*, int);
6388double rb_str_to_dbl(VALUE, int);
6389
6390
6391
6392
6393ID rb_id_attrset(ID);
6394__attribute__((__const__))
6395int rb_is_const_id(ID);
6396__attribute__((__const__))
6397int rb_is_global_id(ID);
6398__attribute__((__const__))
6399int rb_is_instance_id(ID);
6400__attribute__((__const__))
6401int rb_is_attrset_id(ID);
6402__attribute__((__const__))
6403int rb_is_class_id(ID);
6404__attribute__((__const__))
6405int rb_is_local_id(ID);
6406__attribute__((__const__))
6407int rb_is_junk_id(ID);
6408int rb_symname_p(const char*);
6409int rb_sym_interned_p(VALUE);
6410VALUE rb_backref_get(void);
6411void rb_backref_set(VALUE);
6412VALUE rb_lastline_get(void);
6413void rb_lastline_set(VALUE);
6414VALUE rb_sym_all_symbols(void);
6415
6416
6417
6418
6419void rb_last_status_set(int status, pid_t pid);
6420VALUE rb_last_status_get(void);
6421int rb_proc_exec(const char*);
6422__attribute__((__noreturn__))
6423VALUE rb_f_exec(int, const VALUE*);
6424pid_t rb_waitpid(pid_t pid, int *status, int flags);
6425void rb_syswait(pid_t pid);
6426pid_t rb_spawn(int, const VALUE*);
6427pid_t rb_spawn_err(int, const VALUE*, char*, size_t);
6428VALUE rb_proc_times(VALUE);
6429VALUE rb_detach_process(pid_t pid);
6430
6431
6432
6433
6434unsigned int rb_genrand_int32(void);
6435double rb_genrand_real(void);
6436void rb_reset_random_seed(void);
6437VALUE rb_random_bytes(VALUE rnd, long n);
6438VALUE rb_random_int(VALUE rnd, VALUE max);
6439unsigned int rb_random_int32(VALUE rnd);
6440double rb_random_real(VALUE rnd);
6441unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit);
6442unsigned long rb_genrand_ulong_limited(unsigned long i);
6443
6444
6445
6446
6447VALUE rb_range_new(VALUE, VALUE, int);
6448VALUE rb_range_beg_len(VALUE, long*, long*, long, int);
6449int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp);
6450
6451
6452
6453
6454VALUE rb_rational_raw(VALUE, VALUE);
6455VALUE rb_rational_new(VALUE, VALUE);
6456VALUE rb_Rational(VALUE, VALUE);
6457VALUE rb_rational_num(VALUE rat);
6458VALUE rb_rational_den(VALUE rat);
6459VALUE rb_flt_rationalize_with_prec(VALUE, VALUE);
6460VALUE rb_flt_rationalize(VALUE);
6461
6462
6463
6464
6465int rb_memcicmp(const void*,const void*,long);
6466void rb_match_busy(VALUE);
6467VALUE rb_reg_nth_defined(int, VALUE);
6468VALUE rb_reg_nth_match(int, VALUE);
6469int rb_reg_backref_number(VALUE match, VALUE backref);
6470VALUE rb_reg_last_match(VALUE);
6471VALUE rb_reg_match_pre(VALUE);
6472VALUE rb_reg_match_post(VALUE);
6473VALUE rb_reg_match_last(VALUE);
6474VALUE rb_reg_new_str(VALUE, int);
6475VALUE rb_reg_new(const char *, long, int);
6476VALUE rb_reg_alloc(void);
6477VALUE rb_reg_init_str(VALUE re, VALUE s, int options);
6478VALUE rb_reg_match(VALUE, VALUE);
6479VALUE rb_reg_match2(VALUE);
6480int rb_reg_options(VALUE);
6481
6482
6483
6484
6485extern VALUE rb_argv0;
6486VALUE rb_get_argv(void);
6487void *rb_load_file(const char*);
6488void *rb_load_file_str(VALUE);
6489
6490
6491struct timeval;
6492typedef struct {
6493 int maxfd;
6494 fd_set *fdset;
6495} rb_fdset_t;
6496
6497
6498void rb_fd_init(rb_fdset_t *);
6499void rb_fd_term(rb_fdset_t *);
6500void rb_fd_zero(rb_fdset_t *);
6501void rb_fd_set(int, rb_fdset_t *);
6502void rb_fd_clr(int, rb_fdset_t *);
6503int rb_fd_isset(int, const rb_fdset_t *);
6504void rb_fd_copy(rb_fdset_t *, const fd_set *, int);
6505void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
6506int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
6507
6508
6509__attribute__((__nonnull__ ()))
6510__attribute__((__pure__))
6511static inline fd_set *
6512rb_fd_ptr(const rb_fdset_t *f)
6513{
6514 return f->fdset;
6515}
6516__attribute__((__nonnull__ ()))
6517__attribute__((__pure__))
6518static inline int
6519rb_fd_max(const rb_fdset_t *f)
6520{
6521 return f->maxfd;
6522}
6523
6524
6525struct timeval;
6526int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
6527
6528
6529
6530
6531VALUE rb_f_kill(int, const VALUE*);
6532void (*ruby_posix_signal(int, void (*)(int)))(int);
6533const char *ruby_signal_name(int);
6534void ruby_default_signal(int);
6535
6536
6537
6538
6539VALUE rb_f_sprintf(int, const VALUE*);
6540__attribute__((__format__(__printf__, 1, 2)))
6541VALUE rb_sprintf(const char*, ...);
6542VALUE rb_vsprintf(const char*, va_list);
6543__attribute__((__format__(__printf__, 2, 3)))
6544VALUE rb_str_catf(VALUE, const char*, ...);
6545VALUE rb_str_vcatf(VALUE, const char*, va_list);
6546VALUE rb_str_format(int, const VALUE *, VALUE);
6547
6548
6549
6550
6551VALUE rb_str_new(const char*, long);
6552VALUE rb_str_new_cstr(const char*);
6553VALUE rb_str_new_shared(VALUE);
6554VALUE rb_str_new_frozen(VALUE);
6555VALUE rb_str_new_with_class(VALUE, const char*, long);
6556VALUE rb_tainted_str_new_cstr(const char*);
6557VALUE rb_tainted_str_new(const char*, long);
6558VALUE rb_external_str_new(const char*, long);
6559VALUE rb_external_str_new_cstr(const char*);
6560VALUE rb_locale_str_new(const char*, long);
6561VALUE rb_locale_str_new_cstr(const char*);
6562VALUE rb_filesystem_str_new(const char*, long);
6563VALUE rb_filesystem_str_new_cstr(const char*);
6564VALUE rb_str_buf_new(long);
6565VALUE rb_str_buf_new_cstr(const char*);
6566VALUE rb_str_buf_new2(const char*);
6567VALUE rb_str_tmp_new(long);
6568VALUE rb_usascii_str_new(const char*, long);
6569VALUE rb_usascii_str_new_cstr(const char*);
6570VALUE rb_utf8_str_new(const char*, long);
6571VALUE rb_utf8_str_new_cstr(const char*);
6572VALUE rb_str_new_static(const char *ptr, long len);
6573VALUE rb_usascii_str_new_static(const char *ptr, long len);
6574VALUE rb_utf8_str_new_static(const char *ptr, long len);
6575VALUE rb_str_to_interned_str(VALUE);
6576VALUE rb_interned_str(const char *, long);
6577VALUE rb_interned_str_cstr(const char *);
6578void rb_str_free(VALUE);
6579void rb_str_shared_replace(VALUE, VALUE);
6580VALUE rb_str_buf_append(VALUE, VALUE);
6581VALUE rb_str_buf_cat(VALUE, const char*, long);
6582VALUE rb_str_buf_cat2(VALUE, const char*);
6583VALUE rb_str_buf_cat_ascii(VALUE, const char*);
6584VALUE rb_obj_as_string(VALUE);
6585VALUE rb_check_string_type(VALUE);
6586void rb_must_asciicompat(VALUE);
6587VALUE rb_str_dup(VALUE);
6588VALUE rb_str_resurrect(VALUE str);
6589VALUE rb_str_locktmp(VALUE);
6590VALUE rb_str_unlocktmp(VALUE);
6591VALUE rb_str_dup_frozen(VALUE);
6592VALUE rb_str_plus(VALUE, VALUE);
6593VALUE rb_str_times(VALUE, VALUE);
6594long rb_str_sublen(VALUE, long);
6595VALUE rb_str_substr(VALUE, long, long);
6596VALUE rb_str_subseq(VALUE, long, long);
6597char *rb_str_subpos(VALUE, long, long*);
6598void rb_str_modify(VALUE);
6599void rb_str_modify_expand(VALUE, long);
6600VALUE rb_str_freeze(VALUE);
6601void rb_str_set_len(VALUE, long);
6602VALUE rb_str_resize(VALUE, long);
6603VALUE rb_str_cat(VALUE, const char*, long);
6604VALUE rb_str_cat_cstr(VALUE, const char*);
6605VALUE rb_str_cat2(VALUE, const char*);
6606VALUE rb_str_append(VALUE, VALUE);
6607VALUE rb_str_concat(VALUE, VALUE);
6608st_index_t rb_memhash(const void *ptr, long len);
6609st_index_t rb_hash_start(st_index_t);
6610st_index_t rb_hash_uint32(st_index_t, uint32_t);
6611st_index_t rb_hash_uint(st_index_t, st_index_t);
6612st_index_t rb_hash_end(st_index_t);
6613st_index_t rb_str_hash(VALUE);
6614int rb_str_hash_cmp(VALUE,VALUE);
6615int rb_str_comparable(VALUE, VALUE);
6616int rb_str_cmp(VALUE, VALUE);
6617VALUE rb_str_equal(VALUE str1, VALUE str2);
6618VALUE rb_str_drop_bytes(VALUE, long);
6619void rb_str_update(VALUE, long, long, VALUE);
6620VALUE rb_str_replace(VALUE, VALUE);
6621VALUE rb_str_inspect(VALUE);
6622VALUE rb_str_dump(VALUE);
6623VALUE rb_str_split(VALUE, const char*);
6625VALUE rb_str_intern(VALUE);
6626VALUE rb_sym_to_s(VALUE);
6627long rb_str_strlen(VALUE);
6628VALUE rb_str_length(VALUE);
6629long rb_str_offset(VALUE, long);
6630__attribute__((__pure__))
6631size_t rb_str_capacity(VALUE);
6632VALUE rb_str_ellipsize(VALUE, long);
6633VALUE rb_str_scrub(VALUE, VALUE);
6634VALUE rb_str_succ(VALUE);
6635__attribute__((__nonnull__ ()))
6636static inline long
6637rbimpl_strlen(const char *str)
6638{
6639 return ((long)strlen(str));
6640}
6641static inline VALUE
6642rbimpl_str_new_cstr(const char *str)
6643{
6644 long len = rbimpl_strlen(str);
6645 return rb_str_new_static(str, len);
6646}
6647static inline VALUE
6648rbimpl_tainted_str_new_cstr(const char *str)
6649{
6650 long len = rbimpl_strlen(str);
6651 return rb_tainted_str_new(str, len);
6652}
6653static inline VALUE
6654rbimpl_usascii_str_new_cstr(const char *str)
6655{
6656 long len = rbimpl_strlen(str);
6657 return rb_usascii_str_new_static(str, len);
6658}
6659static inline VALUE
6660rbimpl_utf8_str_new_cstr(const char *str)
6661{
6662 long len = rbimpl_strlen(str);
6663 return rb_utf8_str_new_static(str, len);
6664}
6665static inline VALUE
6666rbimpl_external_str_new_cstr(const char *str)
6667{
6668 long len = rbimpl_strlen(str);
6669 return rb_external_str_new(str, len);
6670}
6671static inline VALUE
6672rbimpl_locale_str_new_cstr(const char *str)
6673{
6674 long len = rbimpl_strlen(str);
6675 return rb_locale_str_new(str, len);
6676}
6677static inline VALUE
6678rbimpl_str_buf_new_cstr(const char *str)
6679{
6680 long len = rbimpl_strlen(str);
6681 VALUE buf = rb_str_buf_new(len);
6682 return rb_str_buf_cat(buf, str, len);
6683}
6684static inline VALUE
6685rbimpl_str_cat_cstr(VALUE buf, const char *str)
6686{
6687 long len = rbimpl_strlen(str);
6688 return rb_str_cat(buf, str, len);
6689}
6690static inline VALUE
6691rbimpl_exc_new_cstr(VALUE exc, const char *str)
6692{
6693 long len = rbimpl_strlen(str);
6694 return rb_exc_new(exc, str, len);
6695}
6696
6697
6698
6699
6700VALUE rb_struct_new(VALUE, ...);
6701VALUE rb_struct_define(const char*, ...);
6702VALUE rb_struct_define_under(VALUE, const char*, ...);
6703VALUE rb_struct_alloc(VALUE, VALUE);
6704VALUE rb_struct_initialize(VALUE, VALUE);
6705VALUE rb_struct_aref(VALUE, VALUE);
6706VALUE rb_struct_aset(VALUE, VALUE, VALUE);
6707VALUE rb_struct_getmember(VALUE, ID);
6708VALUE rb_struct_s_members(VALUE);
6709VALUE rb_struct_members(VALUE);
6710VALUE rb_struct_size(VALUE s);
6711VALUE rb_struct_alloc_noinit(VALUE);
6712VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t, ...);
6713VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...);
6714
6715
6716
6717
6718struct timeval;
6719void rb_thread_schedule(void);
6720void rb_thread_wait_fd(int);
6721int rb_thread_fd_writable(int);
6722void rb_thread_fd_close(int);
6723int rb_thread_alone(void);
6724void rb_thread_sleep(int);
6725void rb_thread_sleep_forever(void);
6726void rb_thread_sleep_deadly(void);
6727VALUE rb_thread_stop(void);
6728VALUE rb_thread_wakeup(VALUE);
6729VALUE rb_thread_wakeup_alive(VALUE);
6730VALUE rb_thread_run(VALUE);
6731VALUE rb_thread_kill(VALUE);
6732VALUE rb_thread_create(VALUE (*)(void *), void*);
6733void rb_thread_wait_for(struct timeval);
6734VALUE rb_thread_current(void);
6735VALUE rb_thread_main(void);
6736VALUE rb_thread_local_aref(VALUE, ID);
6737VALUE rb_thread_local_aset(VALUE, ID, VALUE);
6738void rb_thread_atfork(void);
6740VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
6741VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
6742VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
6743VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
6744typedef void rb_unblock_function_t(void *);
6745typedef VALUE rb_blocking_function_t(void *);
6746void rb_thread_check_ints(void);
6747int rb_thread_interrupted(VALUE thval);
6748VALUE rb_mutex_new(void);
6749VALUE rb_mutex_locked_p(VALUE mutex);
6750VALUE rb_mutex_trylock(VALUE mutex);
6751VALUE rb_mutex_lock(VALUE mutex);
6752VALUE rb_mutex_unlock(VALUE mutex);
6753VALUE rb_mutex_sleep(VALUE self, VALUE timeout);
6754VALUE rb_mutex_synchronize(VALUE mutex, VALUE (*func)(VALUE arg), VALUE arg);
6755
6756
6757
6758
6759struct timespec;
6760struct timeval;
6761void rb_timespec_now(struct timespec *);
6762VALUE rb_time_new(time_t, long);
6763VALUE rb_time_nano_new(time_t, long);
6764VALUE rb_time_timespec_new(const struct timespec *, int);
6765VALUE rb_time_num_new(VALUE, VALUE);
6766struct timeval rb_time_interval(VALUE num);
6767struct timeval rb_time_timeval(VALUE time);
6768struct timespec rb_time_timespec(VALUE time);
6769struct timespec rb_time_timespec_interval(VALUE num);
6770VALUE rb_time_utc_offset(VALUE time);
6771
6772
6773
6774
6775VALUE rb_mod_name(VALUE);
6776VALUE rb_class_path(VALUE);
6777VALUE rb_class_path_cached(VALUE);
6778void rb_set_class_path(VALUE, VALUE, const char*);
6779void rb_set_class_path_string(VALUE, VALUE, VALUE);
6780VALUE rb_path_to_class(VALUE);
6781VALUE rb_path2class(const char*);
6782VALUE rb_class_name(VALUE);
6783VALUE rb_autoload_load(VALUE, ID);
6784VALUE rb_autoload_p(VALUE, ID);
6785VALUE rb_f_trace_var(int, const VALUE*);
6786VALUE rb_f_untrace_var(int, const VALUE*);
6787VALUE rb_f_global_variables(void);
6788void rb_alias_variable(ID, ID);
6789void rb_copy_generic_ivar(VALUE,VALUE);
6790void rb_free_generic_ivar(VALUE);
6791VALUE rb_ivar_get(VALUE, ID);
6792VALUE rb_ivar_set(VALUE, ID, VALUE);
6793VALUE rb_ivar_defined(VALUE, ID);
6794void rb_ivar_foreach(VALUE, int (*)(ID, VALUE, st_data_t), st_data_t);
6795st_index_t rb_ivar_count(VALUE);
6796VALUE rb_attr_get(VALUE, ID);
6797VALUE rb_obj_instance_variables(VALUE);
6798VALUE rb_obj_remove_instance_variable(VALUE, VALUE);
6799void *rb_mod_const_at(VALUE, void*);
6800void *rb_mod_const_of(VALUE, void*);
6801VALUE rb_const_list(void*);
6802VALUE rb_mod_constants(int, const VALUE *, VALUE);
6803VALUE rb_mod_remove_const(VALUE, VALUE);
6804int rb_const_defined(VALUE, ID);
6805int rb_const_defined_at(VALUE, ID);
6806int rb_const_defined_from(VALUE, ID);
6807VALUE rb_const_get(VALUE, ID);
6808VALUE rb_const_get_at(VALUE, ID);
6809VALUE rb_const_get_from(VALUE, ID);
6810void rb_const_set(VALUE, ID, VALUE);
6811VALUE rb_const_remove(VALUE, ID);
6812VALUE rb_cvar_defined(VALUE, ID);
6813void rb_cvar_set(VALUE, ID, VALUE);
6814VALUE rb_cvar_get(VALUE, ID);
6815void rb_cv_set(VALUE, const char*, VALUE);
6816VALUE rb_cv_get(VALUE, const char*);
6817void rb_define_class_variable(VALUE, const char*, VALUE);
6818VALUE rb_mod_class_variables(int, const VALUE*, VALUE);
6819VALUE rb_mod_remove_cvar(VALUE, VALUE);
6820
6821
6822int ruby_native_thread_p(void);
6823__attribute__((__format__(__printf__, (3), (4)))) int ruby_snprintf(char *str, size_t n, char const *fmt, ...);
6824int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
6825
6826
6827
6828typedef __sig_atomic_t sig_atomic_t;
6829union sigval
6830{
6831 int sival_int;
6832 void *sival_ptr;
6833};
6834typedef union sigval __sigval_t;
6835typedef struct
6836 {
6837 int si_signo;
6838 int si_errno;
6839 int si_code;
6840 int __pad0;
6841 union
6842 {
6843 int _pad[((128 / sizeof (int)) - 4)];
6844 struct
6845 {
6846 __pid_t si_pid;
6847 __uid_t si_uid;
6848 } _kill;
6849 struct
6850 {
6851 int si_tid;
6852 int si_overrun;
6853 __sigval_t si_sigval;
6854 } _timer;
6855 struct
6856 {
6857 __pid_t si_pid;
6858 __uid_t si_uid;
6859 __sigval_t si_sigval;
6860 } _rt;
6861 struct
6862 {
6863 __pid_t si_pid;
6864 __uid_t si_uid;
6865 int si_status;
6866 __clock_t si_utime;
6867 __clock_t si_stime;
6868 } _sigchld;
6869 struct
6870 {
6871 void *si_addr;
6872
6873 short int si_addr_lsb;
6874 union
6875 {
6876 struct
6877 {
6878 void *_lower;
6879 void *_upper;
6880 } _addr_bnd;
6881 __uint32_t _pkey;
6882 } _bounds;
6883 } _sigfault;
6884 struct
6885 {
6886 long int si_band;
6887 int si_fd;
6888 } _sigpoll;
6889 struct
6890 {
6891 void *_call_addr;
6892 int _syscall;
6893 unsigned int _arch;
6894 } _sigsys;
6895 } _sifields;
6896 } siginfo_t ;
6897enum
6898{
6899 SI_ASYNCNL = -60,
6900 SI_DETHREAD = -7,
6901 SI_TKILL,
6902 SI_SIGIO,
6903 SI_ASYNCIO,
6904 SI_MESGQ,
6905 SI_TIMER,
6906 SI_QUEUE,
6907 SI_USER,
6908 SI_KERNEL = 0x80
6909};
6910enum
6911{
6912 ILL_ILLOPC = 1,
6913 ILL_ILLOPN,
6914 ILL_ILLADR,
6915 ILL_ILLTRP,
6916 ILL_PRVOPC,
6917 ILL_PRVREG,
6918 ILL_COPROC,
6919 ILL_BADSTK,
6920 ILL_BADIADDR
6921};
6922enum
6923{
6924 FPE_INTDIV = 1,
6925 FPE_INTOVF,
6926 FPE_FLTDIV,
6927 FPE_FLTOVF,
6928 FPE_FLTUND,
6929 FPE_FLTRES,
6930 FPE_FLTINV,
6931 FPE_FLTSUB,
6932 FPE_FLTUNK = 14,
6933 FPE_CONDTRAP
6934};
6935enum
6936{
6937 SEGV_MAPERR = 1,
6938 SEGV_ACCERR,
6939 SEGV_BNDERR,
6940 SEGV_PKUERR,
6941 SEGV_ACCADI,
6942 SEGV_ADIDERR,
6943 SEGV_ADIPERR,
6944 SEGV_MTEAERR,
6945 SEGV_MTESERR
6946};
6947enum
6948{
6949 BUS_ADRALN = 1,
6950 BUS_ADRERR,
6951 BUS_OBJERR,
6952 BUS_MCEERR_AR,
6953 BUS_MCEERR_AO
6954};
6955enum
6956{
6957 TRAP_BRKPT = 1,
6958 TRAP_TRACE,
6959 TRAP_BRANCH,
6960 TRAP_HWBKPT,
6961 TRAP_UNK
6962};
6963enum
6964{
6965 CLD_EXITED = 1,
6966 CLD_KILLED,
6967 CLD_DUMPED,
6968 CLD_TRAPPED,
6969 CLD_STOPPED,
6970 CLD_CONTINUED
6971};
6972enum
6973{
6974 POLL_IN = 1,
6975 POLL_OUT,
6976 POLL_MSG,
6977 POLL_ERR,
6978 POLL_PRI,
6979 POLL_HUP
6980};
6981typedef __sigval_t sigval_t;
6982typedef struct sigevent
6983 {
6984 __sigval_t sigev_value;
6985 int sigev_signo;
6986 int sigev_notify;
6987 union
6988 {
6989 int _pad[((64 / sizeof (int)) - 4)];
6990 __pid_t _tid;
6991 struct
6992 {
6993 void (*_function) (__sigval_t);
6994 pthread_attr_t *_attribute;
6995 } _sigev_thread;
6996 } _sigev_un;
6997 } sigevent_t;
6998enum
6999{
7000 SIGEV_SIGNAL = 0,
7001 SIGEV_NONE,
7002 SIGEV_THREAD,
7003 SIGEV_THREAD_ID = 4
7004};
7005typedef void (*__sighandler_t) (int);
7006extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
7007 __attribute__ ((__nothrow__ , __leaf__));
7008extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
7009 __attribute__ ((__nothrow__ , __leaf__));
7010extern __sighandler_t signal (int __sig, __sighandler_t __handler)
7011 __attribute__ ((__nothrow__ , __leaf__));
7012extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ , __leaf__));
7013extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ , __leaf__));
7014extern int raise (int __sig) __attribute__ ((__nothrow__ , __leaf__));
7015extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
7016 __attribute__ ((__nothrow__ , __leaf__));
7017extern int gsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
7018extern void psignal (int __sig, const char *__s);
7019extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
7020extern int sigpause (int __sig) __asm__ ("__xpg_sigpause")
7021 __attribute__ ((__deprecated__ ("Use the sigsuspend function instead")));
7022extern int sigblock (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
7023extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
7024extern int siggetmask (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
7025typedef __sighandler_t sighandler_t;
7026typedef __sighandler_t sig_t;
7027extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7028extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7029extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7030extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7031extern int sigismember (const sigset_t *__set, int __signo)
7032 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7033extern int sigisemptyset (const sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7034extern int sigandset (sigset_t *__set, const sigset_t *__left,
7035 const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
7036extern int sigorset (sigset_t *__set, const sigset_t *__left,
7037 const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
7038struct sigaction
7039 {
7040 union
7041 {
7042 __sighandler_t sa_handler;
7043 void (*sa_sigaction) (int, siginfo_t *, void *);
7044 }
7045 __sigaction_handler;
7046 __sigset_t sa_mask;
7047 int sa_flags;
7048 void (*sa_restorer) (void);
7049 };
7050extern int sigprocmask (int __how, const sigset_t *__restrict __set,
7051 sigset_t *__restrict __oset) __attribute__ ((__nothrow__ , __leaf__));
7052extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
7053extern int sigaction (int __sig, const struct sigaction *__restrict __act,
7054 struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ , __leaf__));
7055extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7056extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)
7057 __attribute__ ((__nonnull__ (1, 2)));
7058extern int sigwaitinfo (const sigset_t *__restrict __set,
7059 siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
7060extern int sigtimedwait (const sigset_t *__restrict __set,
7061 siginfo_t *__restrict __info,
7062 const struct timespec *__restrict __timeout)
7063 __attribute__ ((__nonnull__ (1)));
7064extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)
7065 __attribute__ ((__nothrow__ , __leaf__));
7066struct _fpx_sw_bytes
7067{
7068 __uint32_t magic1;
7069 __uint32_t extended_size;
7070 __uint64_t xstate_bv;
7071 __uint32_t xstate_size;
7072 __uint32_t __glibc_reserved1[7];
7073};
7074struct _fpreg
7075{
7076 unsigned short significand[4];
7077 unsigned short exponent;
7078};
7079struct _fpxreg
7080{
7081 unsigned short significand[4];
7082 unsigned short exponent;
7083 unsigned short __glibc_reserved1[3];
7084};
7085struct _xmmreg
7086{
7087 __uint32_t element[4];
7088};
7089struct _fpstate
7090{
7091 __uint16_t cwd;
7092 __uint16_t swd;
7093 __uint16_t ftw;
7094 __uint16_t fop;
7095 __uint64_t rip;
7096 __uint64_t rdp;
7097 __uint32_t mxcsr;
7098 __uint32_t mxcr_mask;
7099 struct _fpxreg _st[8];
7100 struct _xmmreg _xmm[16];
7101 __uint32_t __glibc_reserved1[24];
7102};
7103struct sigcontext
7104{
7105 __uint64_t r8;
7106 __uint64_t r9;
7107 __uint64_t r10;
7108 __uint64_t r11;
7109 __uint64_t r12;
7110 __uint64_t r13;
7111 __uint64_t r14;
7112 __uint64_t r15;
7113 __uint64_t rdi;
7114 __uint64_t rsi;
7115 __uint64_t rbp;
7116 __uint64_t rbx;
7117 __uint64_t rdx;
7118 __uint64_t rax;
7119 __uint64_t rcx;
7120 __uint64_t rsp;
7121 __uint64_t rip;
7122 __uint64_t eflags;
7123 unsigned short cs;
7124 unsigned short gs;
7125 unsigned short fs;
7126 unsigned short __pad0;
7127 __uint64_t err;
7128 __uint64_t trapno;
7129 __uint64_t oldmask;
7130 __uint64_t cr2;
7131 __extension__ union
7132 {
7133 struct _fpstate * fpstate;
7134 __uint64_t __fpstate_word;
7135 };
7136 __uint64_t __reserved1 [8];
7137};
7138struct _xsave_hdr
7139{
7140 __uint64_t xstate_bv;
7141 __uint64_t __glibc_reserved1[2];
7142 __uint64_t __glibc_reserved2[5];
7143};
7144struct _ymmh_state
7145{
7146 __uint32_t ymmh_space[64];
7147};
7148struct _xstate
7149{
7150 struct _fpstate fpstate;
7151 struct _xsave_hdr xstate_hdr;
7152 struct _ymmh_state ymmh;
7153};
7154extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ , __leaf__));
7155typedef struct
7156 {
7157 void *ss_sp;
7158 int ss_flags;
7159 size_t ss_size;
7160 } stack_t;
7161__extension__ typedef long long int greg_t;
7162typedef greg_t gregset_t[23];
7163enum
7164{
7165 REG_R8 = 0,
7166 REG_R9,
7167 REG_R10,
7168 REG_R11,
7169 REG_R12,
7170 REG_R13,
7171 REG_R14,
7172 REG_R15,
7173 REG_RDI,
7174 REG_RSI,
7175 REG_RBP,
7176 REG_RBX,
7177 REG_RDX,
7178 REG_RAX,
7179 REG_RCX,
7180 REG_RSP,
7181 REG_RIP,
7182 REG_EFL,
7183 REG_CSGSFS,
7184 REG_ERR,
7185 REG_TRAPNO,
7186 REG_OLDMASK,
7187 REG_CR2
7188};
7189struct _libc_fpxreg
7190{
7191 unsigned short int significand[4];
7192 unsigned short int exponent;
7193 unsigned short int __glibc_reserved1[3];
7194};
7195struct _libc_xmmreg
7196{
7197 __uint32_t element[4];
7198};
7199struct _libc_fpstate
7200{
7201 __uint16_t cwd;
7202 __uint16_t swd;
7203 __uint16_t ftw;
7204 __uint16_t fop;
7205 __uint64_t rip;
7206 __uint64_t rdp;
7207 __uint32_t mxcsr;
7208 __uint32_t mxcr_mask;
7209 struct _libc_fpxreg _st[8];
7210 struct _libc_xmmreg _xmm[16];
7211 __uint32_t __glibc_reserved1[24];
7212};
7213typedef struct _libc_fpstate *fpregset_t;
7214typedef struct
7215 {
7216 gregset_t gregs;
7217 fpregset_t fpregs;
7218 __extension__ unsigned long long __reserved1 [8];
7219} mcontext_t;
7220typedef struct ucontext_t
7221 {
7222 unsigned long int uc_flags;
7223 struct ucontext_t *uc_link;
7224 stack_t uc_stack;
7225 mcontext_t uc_mcontext;
7226 sigset_t uc_sigmask;
7227 struct _libc_fpstate __fpregs_mem;
7228 __extension__ unsigned long long int __ssp[4];
7229 } ucontext_t;
7230extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__))
7231 __attribute__ ((__deprecated__ ("Use sigaction with SA_RESTART instead")));
7232enum
7233{
7234 SS_ONSTACK = 1,
7235 SS_DISABLE
7236};
7237extern int sigaltstack (const stack_t *__restrict __ss,
7238 stack_t *__restrict __oss) __attribute__ ((__nothrow__ , __leaf__));
7239struct sigstack
7240 {
7241 void *ss_sp;
7242 int ss_onstack;
7243 };
7244extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
7245 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
7246extern int sighold (int __sig) __attribute__ ((__nothrow__ , __leaf__))
7247 __attribute__ ((__deprecated__ ("Use the sigprocmask function instead")));
7248extern int sigrelse (int __sig) __attribute__ ((__nothrow__ , __leaf__))
7249 __attribute__ ((__deprecated__ ("Use the sigprocmask function instead")));
7250extern int sigignore (int __sig) __attribute__ ((__nothrow__ , __leaf__))
7251 __attribute__ ((__deprecated__ ("Use the signal function instead")));
7252extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__ , __leaf__))
7253 __attribute__ ((__deprecated__ ("Use the signal and sigprocmask functions instead")));
7254extern int pthread_sigmask (int __how,
7255 const __sigset_t *__restrict __newmask,
7256 __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ , __leaf__));
7257extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ , __leaf__));
7258extern int pthread_sigqueue (pthread_t __threadid, int __signo,
7259 const union sigval __value) __attribute__ ((__nothrow__ , __leaf__));
7260extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ , __leaf__));
7261extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ , __leaf__));
7262extern int tgkill (__pid_t __tgid, __pid_t __tid, int __signal);
7263
7264
7265typedef long int __jmp_buf[8];
7266struct __jmp_buf_tag
7267 {
7268 __jmp_buf __jmpbuf;
7269 int __mask_was_saved;
7270 __sigset_t __saved_mask;
7271 };
7272typedef struct __jmp_buf_tag jmp_buf[1];
7273extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__));
7274extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__));
7275extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__));
7276extern void longjmp (struct __jmp_buf_tag __env[1], int __val)
7277 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7278extern void _longjmp (struct __jmp_buf_tag __env[1], int __val)
7279 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7280typedef struct __jmp_buf_tag sigjmp_buf[1];
7281extern void siglongjmp (sigjmp_buf __env, int __val)
7282 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7283extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7284extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7285extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7286
7287static inline char *container_of_or_null_(void *member_ptr, size_t offset)
7288{
7289 return member_ptr ? (char *)member_ptr - offset : ((void *)0);
7290}
7291struct list_node
7292{
7293 struct list_node *next, *prev;
7294};
7295struct list_head
7296{
7297 struct list_node n;
7298};
7299static inline void list_head_init(struct list_head *h)
7300{
7301 h->n.next = h->n.prev = &h->n;
7302}
7303static inline void list_node_init(struct list_node *n)
7304{
7305 n->next = n->prev = n;
7306}
7307static inline void list_add_after_(struct list_head *h,
7308 struct list_node *p,
7309 struct list_node *n,
7310 const char *abortstr)
7311{
7312 n->next = p->next;
7313 n->prev = p;
7314 p->next->prev = n;
7315 p->next = n;
7316 (void)((void)abortstr, h);
7317}
7318static inline void list_add_(struct list_head *h,
7319 struct list_node *n,
7320 const char *abortstr)
7321{
7322 list_add_after_(h, &h->n, n, abortstr);
7323}
7324static inline void list_add_before_(struct list_head *h,
7325 struct list_node *p,
7326 struct list_node *n,
7327 const char *abortstr)
7328{
7329 n->next = p;
7330 n->prev = p->prev;
7331 p->prev->next = n;
7332 p->prev = n;
7333 (void)((void)abortstr, h);
7334}
7335static inline void list_add_tail_(struct list_head *h,
7336 struct list_node *n,
7337 const char *abortstr)
7338{
7339 list_add_before_(h, &h->n, n, abortstr);
7340}
7341static inline int list_empty_(const struct list_head *h, const char* abortstr)
7342{
7343 (void)((void)abortstr, h);
7344 return h->n.next == &h->n;
7345}
7346static inline _Bool list_empty_nocheck(const struct list_head *h)
7347{
7348 return h->n.next == &h->n;
7349}
7350static inline void list_del_(struct list_node *n, const char* abortstr)
7351{
7352 (void)((void)abortstr, n);
7353 n->next->prev = n->prev;
7354 n->prev->next = n->next;
7355}
7356static inline void list_del_init_(struct list_node *n, const char *abortstr)
7357{
7358 list_del_(n, abortstr);
7359 list_node_init(n);
7360}
7361static inline void list_del_from(struct list_head *h, struct list_node *n)
7362{
7363 ((void) (0));
7364 list_del_(n, "./ccan/list/list.h" ":" "329");
7365}
7366static inline void list_swap_(struct list_node *o,
7367 struct list_node *n,
7368 const char* abortstr)
7369{
7370 (void)((void)abortstr, o);
7371 *n = *o;
7372 n->next->prev = n;
7373 n->prev->next = n;
7374}
7375static inline const void *list_top_(const struct list_head *h, size_t off)
7376{
7377 if (list_empty_(h, "./ccan/list/list.h" ":" "399"))
7378 return ((void *)0);
7379 return (const char *)h->n.next - off;
7380}
7381static inline const void *list_pop_(const struct list_head *h, size_t off)
7382{
7383 struct list_node *n;
7384 if (list_empty_(h, "./ccan/list/list.h" ":" "425"))
7385 return ((void *)0);
7386 n = h->n.next;
7387 list_del_(n, "./ccan/list/list.h" ":" "428");
7388 return (const char *)n - off;
7389}
7390static inline const void *list_tail_(const struct list_head *h, size_t off)
7391{
7392 if (list_empty_(h, "./ccan/list/list.h" ":" "451"))
7393 return ((void *)0);
7394 return (const char *)h->n.prev - off;
7395}
7396static inline void list_append_list_(struct list_head *to,
7397 struct list_head *from,
7398 const char *abortstr)
7399{
7400 struct list_node *from_tail = ((void)abortstr, from)->n.prev;
7401 struct list_node *to_tail = ((void)abortstr, to)->n.prev;
7402 to->n.prev = from_tail;
7403 from_tail->next = &to->n;
7404 to_tail->next = &from->n;
7405 from->n.prev = to_tail;
7406 list_del_(&from->n, "./ccan/list/list.h" ":" "600");
7407 list_head_init(from);
7408}
7409static inline void list_prepend_list_(struct list_head *to,
7410 struct list_head *from,
7411 const char *abortstr)
7412{
7413 struct list_node *from_tail = ((void)abortstr, from)->n.prev;
7414 struct list_node *to_head = ((void)abortstr, to)->n.next;
7415 to->n.next = &from->n;
7416 from->n.prev = &to->n;
7417 to_head->prev = from_tail;
7418 from_tail->next = to_head;
7419 list_del_(&from->n, "./ccan/list/list.h" ":" "632");
7420 list_head_init(from);
7421}
7422static inline void *list_node_to_off_(struct list_node *node, size_t off)
7423{
7424 return (void *)((char *)node - off);
7425}
7426static inline struct list_node *list_node_from_off_(void *ptr, size_t off)
7427{
7428 return (struct list_node *)((char *)ptr + off);
7429}
7430static inline void *list_entry_or_null(const struct list_head *h,
7431 const struct list_node *n,
7432 size_t off)
7433{
7434 if (n == &h->n)
7435 return ((void *)0);
7436 return (char *)n - off;
7437}
7438enum ruby_id_types {
7439 RUBY_ID_STATIC_SYM = 0x01,
7440 RUBY_ID_LOCAL = 0x00,
7441 RUBY_ID_INSTANCE = (0x01<<1),
7442 RUBY_ID_GLOBAL = (0x03<<1),
7443 RUBY_ID_ATTRSET = (0x04<<1),
7444 RUBY_ID_CONST = (0x05<<1),
7445 RUBY_ID_CLASS = (0x06<<1),
7446 RUBY_ID_JUNK = (0x07<<1),
7447 RUBY_ID_INTERNAL = RUBY_ID_JUNK,
7448 RUBY_ID_SCOPE_SHIFT = 4,
7449 RUBY_ID_SCOPE_MASK = (~(~0U<<(RUBY_ID_SCOPE_SHIFT-1))<<1)
7450};
7451enum ruby_method_ids {
7452 idDot2 = 128,
7453 idDot3 = 129,
7454 idUPlus = 132,
7455 idUMinus = 133,
7456 idPow = 134,
7457 idCmp = 135,
7458 idPLUS = '+',
7459 idMINUS = '-',
7460 idMULT = '*',
7461 idDIV = '/',
7462 idMOD = '%',
7463 idLTLT = 136,
7464 idGTGT = 137,
7465 idLT = '<',
7466 idLE = 138,
7467 idGT = '>',
7468 idGE = 139,
7469 idEq = 140,
7470 idEqq = 141,
7471 idNeq = 142,
7472 idNot = '!',
7473 idAnd = '&',
7474 idOr = '|',
7475 idBackquote = '`',
7476 idEqTilde = 143,
7477 idNeqTilde = 144,
7478 idAREF = 145,
7479 idASET = 146,
7480 idCOLON2 = 147,
7481 idANDOP = 148,
7482 idOROP = 149,
7483 idANDDOT = 150,
7484 tPRESERVED_ID_BEGIN = 150,
7485 idNilP,
7486 idNULL,
7487 idEmptyP,
7488 idEqlP,
7489 idRespond_to,
7490 idRespond_to_missing,
7491 idIFUNC,
7492 idCFUNC,
7493 id_core_set_method_alias,
7494 id_core_set_variable_alias,
7495 id_core_undef_method,
7496 id_core_define_method,
7497 id_core_define_singleton_method,
7498 id_core_set_postexe,
7499 id_core_hash_merge_ptr,
7500 id_core_hash_merge_kwd,
7501 id_core_raise,
7502 id_debug_created_info,
7503 tPRESERVED_ID_END,
7504 tTOKEN_LOCAL_BEGIN = tPRESERVED_ID_END-1,
7505 tMax,
7506 tMin,
7507 tFreeze,
7508 tInspect,
7509 tIntern,
7510 tObject_id,
7511 tConst_missing,
7512 tMethodMissing,
7513 tMethod_added,
7514 tSingleton_method_added,
7515 tMethod_removed,
7516 tSingleton_method_removed,
7517 tMethod_undefined,
7518 tSingleton_method_undefined,
7519 tLength,
7520 tSize,
7521 tGets,
7522 tSucc,
7523 tEach,
7524 tProc,
7525 tLambda,
7526 tSend,
7527 t__send__,
7528 t__attached__,
7529 tInitialize,
7530 tInitialize_copy,
7531 tInitialize_clone,
7532 tInitialize_dup,
7533 tTo_int,
7534 tTo_ary,
7535 tTo_str,
7536 tTo_sym,
7537 tTo_hash,
7538 tTo_proc,
7539 tTo_io,
7540 tTo_a,
7541 tTo_s,
7542 tTo_i,
7543 tTo_f,
7544 tTo_r,
7545 tBt,
7546 tBt_locations,
7547 tCall,
7548 tMesg,
7549 tException,
7550 tLocals,
7551 tNOT,
7552 tAND,
7553 tOR,
7554 tDiv,
7555 tDivmod,
7556 tFdiv,
7557 tQuo,
7558 tName,
7559 tNil,
7560 tUScore,
7561 tNUMPARAM_1,
7562 tNUMPARAM_2,
7563 tNUMPARAM_3,
7564 tNUMPARAM_4,
7565 tNUMPARAM_5,
7566 tNUMPARAM_6,
7567 tNUMPARAM_7,
7568 tNUMPARAM_8,
7569 tNUMPARAM_9,
7570 tTOKEN_LOCAL_END,
7571 tTOKEN_INSTANCE_BEGIN = tTOKEN_LOCAL_END-1,
7572 tTOKEN_INSTANCE_END,
7573 tTOKEN_GLOBAL_BEGIN = tTOKEN_INSTANCE_END-1,
7574 tLASTLINE,
7575 tBACKREF,
7576 tERROR_INFO,
7577 tTOKEN_GLOBAL_END,
7578 tTOKEN_CONST_BEGIN = tTOKEN_GLOBAL_END-1,
7579 tTOKEN_CONST_END,
7580 tTOKEN_CLASS_BEGIN = tTOKEN_CONST_END-1,
7581 tTOKEN_CLASS_END,
7582 tTOKEN_ATTRSET_BEGIN = tTOKEN_CLASS_END-1,
7583 tTOKEN_ATTRSET_END,
7584 tNEXT_ID = tTOKEN_ATTRSET_END,
7585 idMax = ((tMax<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7586 idMin = ((tMin<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7587 idFreeze = ((tFreeze<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7588 idInspect = ((tInspect<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7589 idIntern = ((tIntern<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7590 idObject_id = ((tObject_id<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7591 idConst_missing = ((tConst_missing<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7592 idMethodMissing = ((tMethodMissing<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7593 idMethod_added = ((tMethod_added<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7594 idSingleton_method_added = ((tSingleton_method_added<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7595 idMethod_removed = ((tMethod_removed<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7596 idSingleton_method_removed = ((tSingleton_method_removed<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7597 idMethod_undefined = ((tMethod_undefined<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7598 idSingleton_method_undefined = ((tSingleton_method_undefined<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7599 idLength = ((tLength<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7600 idSize = ((tSize<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7601 idGets = ((tGets<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7602 idSucc = ((tSucc<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7603 idEach = ((tEach<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7604 idProc = ((tProc<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7605 idLambda = ((tLambda<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7606 idSend = ((tSend<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7607 id__send__ = ((t__send__<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7608 id__attached__ = ((t__attached__<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7609 idInitialize = ((tInitialize<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7610 idInitialize_copy = ((tInitialize_copy<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7611 idInitialize_clone = ((tInitialize_clone<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7612 idInitialize_dup = ((tInitialize_dup<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7613 idTo_int = ((tTo_int<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7614 idTo_ary = ((tTo_ary<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7615 idTo_str = ((tTo_str<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7616 idTo_sym = ((tTo_sym<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7617 idTo_hash = ((tTo_hash<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7618 idTo_proc = ((tTo_proc<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7619 idTo_io = ((tTo_io<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7620 idTo_a = ((tTo_a<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7621 idTo_s = ((tTo_s<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7622 idTo_i = ((tTo_i<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7623 idTo_f = ((tTo_f<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7624 idTo_r = ((tTo_r<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7625 idBt = ((tBt<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7626 idBt_locations = ((tBt_locations<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7627 idCall = ((tCall<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7628 idMesg = ((tMesg<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7629 idException = ((tException<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7630 idLocals = ((tLocals<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7631 idNOT = ((tNOT<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7632 idAND = ((tAND<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7633 idOR = ((tOR<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7634 idDiv = ((tDiv<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7635 idDivmod = ((tDivmod<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7636 idFdiv = ((tFdiv<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7637 idQuo = ((tQuo<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7638 idName = ((tName<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7639 idNil = ((tNil<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7640 idUScore = ((tUScore<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7641 idNUMPARAM_1 = ((tNUMPARAM_1<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7642 idNUMPARAM_2 = ((tNUMPARAM_2<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7643 idNUMPARAM_3 = ((tNUMPARAM_3<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7644 idNUMPARAM_4 = ((tNUMPARAM_4<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7645 idNUMPARAM_5 = ((tNUMPARAM_5<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7646 idNUMPARAM_6 = ((tNUMPARAM_6<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7647 idNUMPARAM_7 = ((tNUMPARAM_7<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7648 idNUMPARAM_8 = ((tNUMPARAM_8<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7649 idNUMPARAM_9 = ((tNUMPARAM_9<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7650 idLASTLINE = ((tLASTLINE<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_GLOBAL|RUBY_ID_STATIC_SYM),
7651 idBACKREF = ((tBACKREF<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_GLOBAL|RUBY_ID_STATIC_SYM),
7652 idERROR_INFO = ((tERROR_INFO<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_GLOBAL|RUBY_ID_STATIC_SYM),
7653 tLAST_OP_ID = tPRESERVED_ID_END-1,
7654 idLAST_OP_ID = tLAST_OP_ID >> RUBY_ID_SCOPE_SHIFT
7655};
7656void rb_obj_info_dump(VALUE obj);
7657void rb_obj_info_dump_loc(VALUE obj, const char *file, int line, const char *func);
7658
7659
7660void ruby_debug_breakpoint(void);
7661__attribute__((__format__(__printf__, (1), (2)))) void ruby_debug_printf(const char*, ...);
7662
7663
7664VALUE rb_ary_last(int, const VALUE *, VALUE);
7665void rb_ary_set_len(VALUE, long);
7666void rb_ary_delete_same(VALUE, VALUE);
7667VALUE rb_ary_tmp_new_fill(long capa);
7668VALUE rb_ary_at(VALUE, VALUE);
7669size_t rb_ary_memsize(VALUE);
7670VALUE rb_to_array_type(VALUE obj);
7671void rb_ary_cancel_sharing(VALUE ary);
7672static inline VALUE rb_ary_entry_internal(VALUE ary, long offset);
7673static inline _Bool ARY_PTR_USING_P(VALUE ary);
7674static inline void RARY_TRANSIENT_SET(VALUE ary);
7675static inline void RARY_TRANSIENT_UNSET(VALUE ary);
7676
7677
7678void rb_ary_detransient(VALUE a);
7679VALUE *rb_ary_ptr_use_start(VALUE ary);
7680void rb_ary_ptr_use_end(VALUE ary);
7681
7682
7683
7684
7685VALUE rb_ary_tmp_new_from_values(VALUE, long, const VALUE *);
7686VALUE rb_check_to_array(VALUE ary);
7687VALUE rb_ary_behead(VALUE, long);
7688VALUE rb_ary_aref1(VALUE ary, VALUE i);
7690VALUE rb_ec_ary_new_from_values(struct rb_execution_context_struct *ec, long n, const VALUE *elts);
7691
7692
7693static inline VALUE
7694rb_ary_entry_internal(VALUE ary, long offset)
7695{
7696 long len = rb_array_len(ary);
7697 const VALUE *ptr = rb_array_const_ptr_transient(ary);
7698 if (len == 0) return ((VALUE)RUBY_Qnil);
7699 if (offset < 0) {
7700 offset += len;
7701 if (offset < 0) return ((VALUE)RUBY_Qnil);
7702 }
7703 else if (len <= offset) {
7704 return ((VALUE)RUBY_Qnil);
7705 }
7706 return ptr[offset];
7707}
7708static inline _Bool
7709ARY_PTR_USING_P(VALUE ary)
7710{
7711 return RB_FL_TEST_RAW(ary, ((VALUE)RUBY_FL_USER14));
7712}
7713static inline void
7714RARY_TRANSIENT_SET(VALUE ary)
7715{
7716 RB_FL_SET_RAW(ary, RARRAY_TRANSIENT_FLAG);
7717}
7718static inline void
7719RARY_TRANSIENT_UNSET(VALUE ary)
7720{
7721 RB_FL_UNSET_RAW(ary, RARRAY_TRANSIENT_FLAG);
7722}
7723__attribute__((__pure__))
7724__attribute__((__artificial__))
7725static inline VALUE
7726RARRAY_AREF(VALUE ary, long i)
7727{
7728 ((void)0);
7729 return rb_array_const_ptr_transient(ary)[i];
7730}
7731typedef unsigned long long rb_serial_t;
7736struct rb_callinfo;
7737enum method_missing_reason {
7738 MISSING_NOENTRY = 0x00,
7739 MISSING_PRIVATE = 0x01,
7740 MISSING_PROTECTED = 0x02,
7741 MISSING_FCALL = 0x04,
7742 MISSING_VCALL = 0x08,
7743 MISSING_SUPER = 0x10,
7744 MISSING_MISSING = 0x20,
7745 MISSING_NONE = 0x40
7746};
7747rb_serial_t rb_next_class_serial(void);
7748VALUE rb_obj_is_thread(VALUE obj);
7749void rb_vm_mark(void *ptr);
7750void rb_vm_each_stack_value(void *ptr, void (*cb)(VALUE, void*), void *ctx);
7751__attribute__((__pure__)) VALUE rb_vm_top_self(void);
7752void rb_vm_inc_const_missing_count(void);
7753const void **rb_vm_get_insns_address_table(void);
7754VALUE rb_source_location(int *pline);
7755const char *rb_source_location_cstr(int *pline);
7756static void rb_vm_pop_cfunc_frame(void);
7757int rb_vm_add_root_module(VALUE module);
7758void rb_vm_check_redefinition_by_prepend(VALUE klass);
7759int rb_vm_check_optimizable_mid(VALUE mid);
7760VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
7761static VALUE ruby_vm_special_exception_copy(VALUE);
7762__attribute__((__pure__)) st_table *rb_vm_fstring_table(void);
7763
7764
7765VALUE rb_vm_exec(struct rb_execution_context_struct *, _Bool);
7766
7767
7768VALUE rb_current_realfilepath(void);
7769VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE);
7770typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE);
7771VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv,
7772 rb_check_funcall_hook *hook, VALUE arg);
7773VALUE rb_check_funcall_with_hook_kw(VALUE recv, ID mid, int argc, const VALUE *argv,
7774 rb_check_funcall_hook *hook, VALUE arg, int kw_splat);
7775const char *rb_type_str(enum ruby_value_type type);
7776VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
7777VALUE rb_check_funcall_basic_kw(VALUE, ID, VALUE, int, const VALUE*, int);
7778VALUE rb_yield_1(VALUE val);
7779VALUE rb_yield_force_blockarg(VALUE values);
7780VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
7781 rb_block_call_func_t bl_proc, int min_argc, int max_argc,
7782 VALUE data2);
7783void rb_check_stack_overflow(void);
7784VALUE rb_equal_opt(VALUE obj1, VALUE obj2);
7785VALUE rb_eql_opt(VALUE obj1, VALUE obj2);
7786struct rb_iseq_struct;
7787
7788
7789const struct rb_callcache *rb_vm_search_method_slowpath(const struct rb_callinfo *ci, VALUE klass);
7790
7791
7793
7794
7795int rb_ec_obj_respond_to(struct rb_execution_context_struct *ec, VALUE obj, ID id, int priv);
7796
7797
7798void rb_print_backtrace(void);
7799VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval);
7800VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval);
7801VALUE rb_vm_backtrace(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
7802VALUE rb_vm_backtrace_locations(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
7803VALUE rb_make_backtrace(void);
7804void rb_backtrace_print_as_bugreport(void);
7805int rb_backtrace_p(VALUE obj);
7806VALUE rb_backtrace_to_str_ary(VALUE obj);
7807VALUE rb_backtrace_to_location_ary(VALUE obj);
7808void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output);
7809
7810
7811VALUE rb_ec_backtrace_object(const struct rb_execution_context_struct *ec);
7812void rb_backtrace_use_iseq_first_lineno_for_last_location(VALUE self);
7813
7814
7816struct rb_objspace;
7817typedef struct ractor_newobj_cache {
7818 struct RVALUE *freelist;
7819 struct heap_page *using_page;
7821extern VALUE *ruby_initial_gc_stress_ptr;
7822extern int ruby_disable_gc;
7823__attribute__((__malloc__)) void *ruby_mimmalloc(size_t size);
7824void ruby_mimfree(void *ptr);
7825void rb_objspace_set_event_hook(const rb_event_flag_t event);
7826VALUE rb_objspace_gc_enable(struct rb_objspace *);
7827VALUE rb_objspace_gc_disable(struct rb_objspace *);
7828void ruby_gc_set_params(void);
7829void rb_copy_wb_protected_attribute(VALUE dest, VALUE obj);
7830__attribute__((__alloc_align__(1)))
7831__attribute__((__malloc__)) void *rb_aligned_malloc(size_t, size_t) __attribute__((__alloc_size__ (2)));
7832size_t rb_size_mul_or_raise(size_t, size_t, VALUE);
7833size_t rb_size_mul_add_or_raise(size_t, size_t, size_t, VALUE);
7834__attribute__((__malloc__)) void *rb_xmalloc_mul_add(size_t, size_t, size_t);
7835void *rb_xrealloc_mul_add(const void *, size_t, size_t, size_t);
7836__attribute__((__malloc__)) void *rb_xmalloc_mul_add_mul(size_t, size_t, size_t, size_t);
7837__attribute__((__malloc__)) void *rb_xcalloc_mul_add_mul(size_t, size_t, size_t, size_t);
7838static inline void *ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2)));
7839static inline void *ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2, 3)));
7840static inline void ruby_sized_xfree_inlined(void *ptr, size_t size);
7841VALUE rb_class_allocate_instance(VALUE klass);
7842
7843
7844const char *rb_objspace_data_type_name(VALUE obj);
7845VALUE rb_wb_protected_newobj_of(VALUE, VALUE);
7846VALUE rb_wb_unprotected_newobj_of(VALUE, VALUE);
7847VALUE rb_ec_wb_protected_newobj_of(struct rb_execution_context_struct *ec, VALUE klass, VALUE flags);
7848size_t rb_obj_memsize_of(VALUE);
7849void rb_gc_verify_internal_consistency(void);
7850size_t rb_obj_gc_flags(VALUE, ID[], size_t);
7851void rb_gc_mark_values(long n, const VALUE *values);
7852void rb_gc_mark_vm_stack_values(long n, const VALUE *values);
7853void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2)));
7854void *ruby_sized_xrealloc2(void *ptr, size_t new_count, size_t element_size, size_t old_count) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2, 3)));
7855void ruby_sized_xfree(void *x, size_t size);
7856void rb_gc_ractor_newobj_cache_clear(rb_ractor_newobj_cache_t *newobj_cache);
7857
7858
7859
7860
7861int rb_ec_stack_check(struct rb_execution_context_struct *ec);
7862void rb_gc_writebarrier_remember(VALUE obj);
7863const char *rb_obj_info(VALUE obj);
7864
7865
7866static inline void *
7867ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size)
7868{
7869 return ruby_xrealloc(ptr, new_size);
7870}
7871static inline void *
7872ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count)
7873{
7874 return ruby_xrealloc2(ptr, new_count, elemsiz);
7875}
7876static inline void
7877ruby_sized_xfree_inlined(void *ptr, size_t size)
7878{
7879 ruby_xfree(ptr);
7880}
7881enum imemo_type {
7882 imemo_env = 0,
7883 imemo_cref = 1,
7884 imemo_svar = 2,
7885 imemo_throw_data = 3,
7886 imemo_ifunc = 4,
7887 imemo_memo = 5,
7888 imemo_ment = 6,
7889 imemo_iseq = 7,
7890 imemo_tmpbuf = 8,
7891 imemo_ast = 9,
7892 imemo_parser_strterm = 10,
7893 imemo_callinfo = 11,
7894 imemo_callcache = 12,
7895 imemo_constcache = 13,
7896};
7897struct vm_svar {
7898 VALUE flags;
7899 const VALUE cref_or_me;
7900 const VALUE lastline;
7901 const VALUE backref;
7902 const VALUE others;
7903};
7904struct vm_throw_data {
7905 VALUE flags;
7906 VALUE reserved;
7907 const VALUE throw_obj;
7908 const struct rb_control_frame_struct *catch_frame;
7909 int throw_state;
7910};
7911struct vm_ifunc_argc {
7912 int min, max;
7913};
7914struct vm_ifunc {
7915 VALUE flags;
7916 VALUE reserved;
7917 rb_block_call_func_t func;
7918 const void *data;
7919 struct vm_ifunc_argc argc;
7920};
7922 VALUE flags;
7923 VALUE reserved;
7924 VALUE *ptr;
7925 struct rb_imemo_tmpbuf_struct *next;
7926 size_t cnt;
7927};
7928struct MEMO {
7929 VALUE flags;
7930 VALUE reserved;
7931 const VALUE v1;
7932 const VALUE v2;
7933 union {
7934 long cnt;
7935 long state;
7936 const VALUE value;
7937 void (*func)(void);
7938 } u3;
7939};
7941VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
7942rb_imemo_tmpbuf_t *rb_imemo_tmpbuf_parser_heap(void *buf, rb_imemo_tmpbuf_t *old_heap, size_t cnt);
7943struct vm_ifunc *rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc);
7944void rb_strterm_mark(VALUE obj);
7945static inline enum imemo_type imemo_type(VALUE imemo);
7946static inline int imemo_type_p(VALUE imemo, enum imemo_type imemo_type);
7947static inline _Bool imemo_throw_data_p(VALUE imemo);
7948static inline struct vm_ifunc *rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data);
7949static inline VALUE rb_imemo_tmpbuf_auto_free_pointer(void);
7950static inline void *RB_IMEMO_TMPBUF_PTR(VALUE v);
7951static inline void *rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr);
7952static inline VALUE rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str);
7953static inline void MEMO_V1_SET(struct MEMO *m, VALUE v);
7954static inline void MEMO_V2_SET(struct MEMO *m, VALUE v);
7955
7956
7957VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
7958const char *rb_imemo_name(enum imemo_type type);
7959
7960
7961static inline enum imemo_type
7962imemo_type(VALUE imemo)
7963{
7964 return (((struct RBasic *)(imemo))->flags >> ((VALUE)RUBY_FL_USHIFT)) & 0x0f;
7965}
7966static inline int
7967imemo_type_p(VALUE imemo, enum imemo_type imemo_type)
7968{
7969 if ((__builtin_expect(!!(!RB_SPECIAL_CONST_P(imemo)), 1))) {
7970 const VALUE mask = (0x0f << ((VALUE)RUBY_FL_USHIFT)) | RUBY_T_MASK;
7971 const VALUE expected_type = (imemo_type << ((VALUE)RUBY_FL_USHIFT)) | RUBY_T_IMEMO;
7972 return expected_type == (((struct RBasic *)(imemo))->flags & mask);
7973 }
7974 else {
7975 return 0;
7976 }
7977}
7978static inline _Bool
7979imemo_throw_data_p(VALUE imemo)
7980{
7981 return RB_TYPE_P(imemo, RUBY_T_IMEMO);
7982}
7983static inline struct vm_ifunc *
7984rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data)
7985{
7986 return rb_vm_ifunc_new(func, data, 0, (-1));
7987}
7988static inline VALUE
7989rb_imemo_tmpbuf_auto_free_pointer(void)
7990{
7991 return rb_imemo_new(imemo_tmpbuf, 0, 0, 0, 0);
7992}
7993static inline void *
7994RB_IMEMO_TMPBUF_PTR(VALUE v)
7995{
7996 const struct rb_imemo_tmpbuf_struct *p = (const void *)v;
7997 return p->ptr;
7998}
7999static inline void *
8000rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr)
8001{
8002 return ((rb_imemo_tmpbuf_t *)v)->ptr = ptr;
8003}
8004static inline VALUE
8005rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str)
8006{
8007 const void *src;
8008 VALUE imemo;
8009 rb_imemo_tmpbuf_t *tmpbuf;
8010 void *dst;
8011 size_t len;
8012 rb_string_value(&(str));
8013 imemo = rb_imemo_tmpbuf_auto_free_pointer();
8014 tmpbuf = (rb_imemo_tmpbuf_t *)imemo;
8015 len = RSTRING_LEN(str);
8016 src = RSTRING_PTR(str);
8017 dst = ruby_xmalloc(len);
8018 ruby_nonempty_memcpy(dst, src, len);
8019 tmpbuf->ptr = dst;
8020 return imemo;
8021}
8022static inline void
8023MEMO_V1_SET(struct MEMO *m, VALUE v)
8024{
8025 rb_obj_write((VALUE)(m), __extension__({
8026 ;
8027 ; __typeof__((VALUE *)(&m->v1)) unaligned_member_access_result = ((VALUE *)(&m->v1));
8028 ; unaligned_member_access_result; }), (VALUE)(v), "./internal/imemo.h", 235);
8029}
8030static inline void
8031MEMO_V2_SET(struct MEMO *m, VALUE v)
8032{
8033 rb_obj_write((VALUE)(m), __extension__({
8034 ;
8035 ; __typeof__((VALUE *)(&m->v2)) unaligned_member_access_result = ((VALUE *)(&m->v2));
8036 ; unaligned_member_access_result; }), (VALUE)(v), "./internal/imemo.h", 241);
8037}
8038typedef enum {
8039 METHOD_VISI_UNDEF = 0x00,
8040 METHOD_VISI_PUBLIC = 0x01,
8041 METHOD_VISI_PRIVATE = 0x02,
8042 METHOD_VISI_PROTECTED = 0x03,
8043 METHOD_VISI_MASK = 0x03
8044} rb_method_visibility_t;
8045typedef struct rb_scope_visi_struct {
8046 rb_method_visibility_t method_visi : 3;
8047 unsigned int module_func : 1;
8049typedef struct rb_cref_struct {
8050 VALUE flags;
8051 VALUE refinements;
8052 VALUE klass;
8053 struct rb_cref_struct * next;
8054 const rb_scope_visibility_t scope_visi;
8055} rb_cref_t;
8056typedef struct rb_method_entry_struct {
8057 VALUE flags;
8058 VALUE defined_class;
8059 struct rb_method_definition_struct * const def;
8060 ID called_id;
8061 VALUE owner;
8063typedef struct rb_callable_method_entry_struct {
8064 VALUE flags;
8065 const VALUE defined_class;
8066 struct rb_method_definition_struct * const def;
8067 ID called_id;
8068 const VALUE owner;
8070static inline void
8071METHOD_ENTRY_VISI_SET(rb_method_entry_t *me, rb_method_visibility_t visi)
8072{
8073 ((void)0);
8074 me->flags = (me->flags & ~(((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) | (visi << ((((VALUE)RUBY_FL_USHIFT) + 4)+0));
8075}
8076static inline void
8077METHOD_ENTRY_BASIC_SET(rb_method_entry_t *me, unsigned int basic)
8078{
8079 ((void)0);
8080 me->flags = (me->flags & ~(((VALUE)RUBY_FL_USER6) )) | (basic << ((((VALUE)RUBY_FL_USHIFT) + 4)+2));
8081}
8082static inline void
8083METHOD_ENTRY_FLAGS_SET(rb_method_entry_t *me, rb_method_visibility_t visi, unsigned int basic)
8084{
8085 ((void)0);
8086 ((void)0);
8087 me->flags =
8088 (me->flags & ~(((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6))) |
8089 ((visi << ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) | (basic << ((((VALUE)RUBY_FL_USHIFT) + 4)+2)));
8090}
8091static inline void
8092METHOD_ENTRY_FLAGS_COPY(rb_method_entry_t *dst, const rb_method_entry_t *src)
8093{
8094 dst->flags =
8095 (dst->flags & ~(((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6))) |
8096 (src->flags & (((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6)));
8097}
8098typedef enum {
8099 VM_METHOD_TYPE_ISEQ,
8100 VM_METHOD_TYPE_CFUNC,
8101 VM_METHOD_TYPE_ATTRSET,
8102 VM_METHOD_TYPE_IVAR,
8103 VM_METHOD_TYPE_BMETHOD,
8104 VM_METHOD_TYPE_ZSUPER,
8105 VM_METHOD_TYPE_ALIAS,
8106 VM_METHOD_TYPE_UNDEF,
8107 VM_METHOD_TYPE_NOTIMPLEMENTED,
8108 VM_METHOD_TYPE_OPTIMIZED,
8109 VM_METHOD_TYPE_MISSING,
8110 VM_METHOD_TYPE_REFINED,
8111
8112} rb_method_type_t;
8113__extension__ _Static_assert(VM_METHOD_TYPE_REFINED <= (1<<4), "VM_METHOD_TYPE_MINIMUM_BITS" ": " "VM_METHOD_TYPE_REFINED <= (1<<VM_METHOD_TYPE_MINIMUM_BITS)");
8114typedef struct rb_iseq_struct rb_iseq_t;
8115typedef struct rb_method_iseq_struct {
8117 rb_cref_t * cref;
8119typedef struct rb_method_cfunc_struct {
8120 VALUE (*func)();
8121 VALUE (*invoker)(VALUE recv, int argc, const VALUE *argv, VALUE (*func)());
8122 int argc;
8124typedef struct rb_method_attr_struct {
8125 ID id;
8126 VALUE location;
8128typedef struct rb_method_alias_struct {
8129 struct rb_method_entry_struct * original_me;
8131typedef struct rb_method_refined_struct {
8132 struct rb_method_entry_struct * orig_me;
8133 VALUE owner;
8135typedef struct rb_method_bmethod_struct {
8136 VALUE proc;
8137 struct rb_hook_list_struct *hooks;
8138 VALUE defined_ractor;
8140enum method_optimized_type {
8141 OPTIMIZED_METHOD_TYPE_SEND,
8142 OPTIMIZED_METHOD_TYPE_CALL,
8143 OPTIMIZED_METHOD_TYPE_BLOCK_CALL,
8144 OPTIMIZED_METHOD_TYPE__MAX
8145};
8147 rb_method_type_t type : 4;
8148 int alias_count : 28;
8149 int complemented_count : 28;
8150 union {
8151 rb_method_iseq_t iseq;
8152 rb_method_cfunc_t cfunc;
8153 rb_method_attr_t attr;
8154 rb_method_alias_t alias;
8155 rb_method_refined_t refined;
8156 rb_method_bmethod_t bmethod;
8157 enum method_optimized_type optimize_type;
8158 } body;
8159 ID original_id;
8160 uintptr_t method_serial;
8161};
8162struct rb_id_table;
8164__extension__ _Static_assert(__builtin_offsetof (rb_method_definition_t, body)==8, "sizeof_method_def" ": " "offsetof(rb_method_definition_t, body)==8");
8165void rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(), int argc, rb_method_visibility_t visi);
8166void rb_add_method_iseq(VALUE klass, ID mid, const rb_iseq_t *iseq, rb_cref_t *cref, rb_method_visibility_t visi);
8167void rb_add_refined_method_entry(VALUE refined_class, ID mid);
8168void rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_visibility_t visi);
8169rb_method_entry_t *rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_visibility_t noex);
8170rb_method_entry_t *rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def);
8171const rb_method_entry_t *rb_method_entry_at(VALUE obj, ID id);
8172const rb_method_entry_t *rb_method_entry(VALUE klass, ID id);
8173const rb_method_entry_t *rb_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class);
8174const rb_method_entry_t *rb_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class);
8175const rb_method_entry_t *rb_resolve_refined_method(VALUE refinements, const rb_method_entry_t *me);
8176
8177
8178const rb_method_entry_t *rb_resolve_me_location(const rb_method_entry_t *, VALUE[5]);
8179
8180
8181const rb_callable_method_entry_t *rb_callable_method_entry(VALUE klass, ID id);
8182const rb_callable_method_entry_t *rb_callable_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class);
8183const rb_callable_method_entry_t *rb_callable_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class);
8184int rb_method_entry_arity(const rb_method_entry_t *me);
8185int rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2);
8186st_index_t rb_hash_method_entry(st_index_t hash, const rb_method_entry_t *me);
8187VALUE rb_method_entry_location(const rb_method_entry_t *me);
8188void rb_free_method_entry(const rb_method_entry_t *me);
8189const rb_method_entry_t *rb_method_entry_clone(const rb_method_entry_t *me);
8190const rb_callable_method_entry_t *rb_method_entry_complement_defined_class(const rb_method_entry_t *src_me, ID called_id, VALUE defined_class);
8191void rb_method_entry_copy(rb_method_entry_t *dst, const rb_method_entry_t *src);
8192void rb_method_table_insert(VALUE klass, struct rb_id_table *table, ID method_id, const rb_method_entry_t *me);
8193void rb_scope_visibility_set(rb_method_visibility_t);
8194VALUE rb_unnamed_parameters(int arity);
8195void rb_clear_method_cache(VALUE klass_or_module, ID mid);
8196void rb_clear_method_cache_all(void);
8197enum node_type {
8198 NODE_SCOPE,
8199 NODE_BLOCK,
8200 NODE_IF,
8201 NODE_UNLESS,
8202 NODE_CASE,
8203 NODE_CASE2,
8204 NODE_CASE3,
8205 NODE_WHEN,
8206 NODE_IN,
8207 NODE_WHILE,
8208 NODE_UNTIL,
8209 NODE_ITER,
8210 NODE_FOR,
8211 NODE_FOR_MASGN,
8212 NODE_BREAK,
8213 NODE_NEXT,
8214 NODE_REDO,
8215 NODE_RETRY,
8216 NODE_BEGIN,
8217 NODE_RESCUE,
8218 NODE_RESBODY,
8219 NODE_ENSURE,
8220 NODE_AND,
8221 NODE_OR,
8222 NODE_MASGN,
8223 NODE_LASGN,
8224 NODE_DASGN,
8225 NODE_DASGN_CURR,
8226 NODE_GASGN,
8227 NODE_IASGN,
8228 NODE_CDECL,
8229 NODE_CVASGN,
8230 NODE_OP_ASGN1,
8231 NODE_OP_ASGN2,
8232 NODE_OP_ASGN_AND,
8233 NODE_OP_ASGN_OR,
8234 NODE_OP_CDECL,
8235 NODE_CALL,
8236 NODE_OPCALL,
8237 NODE_FCALL,
8238 NODE_VCALL,
8239 NODE_QCALL,
8240 NODE_SUPER,
8241 NODE_ZSUPER,
8242 NODE_LIST,
8243 NODE_ZLIST,
8244 NODE_VALUES,
8245 NODE_HASH,
8246 NODE_RETURN,
8247 NODE_YIELD,
8248 NODE_LVAR,
8249 NODE_DVAR,
8250 NODE_GVAR,
8251 NODE_IVAR,
8252 NODE_CONST,
8253 NODE_CVAR,
8254 NODE_NTH_REF,
8255 NODE_BACK_REF,
8256 NODE_MATCH,
8257 NODE_MATCH2,
8258 NODE_MATCH3,
8259 NODE_LIT,
8260 NODE_STR,
8261 NODE_DSTR,
8262 NODE_XSTR,
8263 NODE_DXSTR,
8264 NODE_EVSTR,
8265 NODE_DREGX,
8266 NODE_ONCE,
8267 NODE_ARGS,
8268 NODE_ARGS_AUX,
8269 NODE_OPT_ARG,
8270 NODE_KW_ARG,
8271 NODE_POSTARG,
8272 NODE_ARGSCAT,
8273 NODE_ARGSPUSH,
8274 NODE_SPLAT,
8275 NODE_BLOCK_PASS,
8276 NODE_DEFN,
8277 NODE_DEFS,
8278 NODE_ALIAS,
8279 NODE_VALIAS,
8280 NODE_UNDEF,
8281 NODE_CLASS,
8282 NODE_MODULE,
8283 NODE_SCLASS,
8284 NODE_COLON2,
8285 NODE_COLON3,
8286 NODE_DOT2,
8287 NODE_DOT3,
8288 NODE_FLIP2,
8289 NODE_FLIP3,
8290 NODE_SELF,
8291 NODE_NIL,
8292 NODE_TRUE,
8293 NODE_FALSE,
8294 NODE_ERRINFO,
8295 NODE_DEFINED,
8296 NODE_POSTEXE,
8297 NODE_DSYM,
8298 NODE_ATTRASGN,
8299 NODE_LAMBDA,
8300 NODE_ARYPTN,
8301 NODE_HSHPTN,
8302 NODE_FNDPTN,
8303 NODE_LAST
8304};
8305typedef struct rb_code_position_struct {
8306 int lineno;
8307 int column;
8309typedef struct rb_code_location_struct {
8310 rb_code_position_t beg_pos;
8311 rb_code_position_t end_pos;
8313static inline rb_code_location_t
8314code_loc_gen(const rb_code_location_t *loc1, const rb_code_location_t *loc2)
8315{
8317 loc.beg_pos = loc1->beg_pos;
8318 loc.end_pos = loc2->end_pos;
8319 return loc;
8320}
8321typedef struct RNode {
8322 VALUE flags;
8323 union {
8324 struct RNode *node;
8325 ID id;
8326 VALUE value;
8327 ID *tbl;
8328 } u1;
8329 union {
8330 struct RNode *node;
8331 ID id;
8332 long argc;
8333 VALUE value;
8334 } u2;
8335 union {
8336 struct RNode *node;
8337 ID id;
8338 long state;
8339 struct rb_args_info *args;
8340 struct rb_ary_pattern_info *apinfo;
8341 struct rb_fnd_pattern_info *fpinfo;
8342 VALUE value;
8343 } u3;
8344 rb_code_location_t nd_loc;
8345 int node_id;
8346} NODE;
8347VALUE rb_node_case_when_optimizable_literal(const NODE *const node);
8348
8349
8350typedef struct node_buffer_struct node_buffer_t;
8351typedef struct rb_ast_body_struct {
8352 const NODE *root;
8353 VALUE compile_option;
8354 int line_count;
8356typedef struct rb_ast_struct {
8357 VALUE flags;
8358 node_buffer_t *node_buffer;
8359 rb_ast_body_t body;
8360} rb_ast_t;
8361rb_ast_t *rb_ast_new(void);
8362void rb_ast_mark(rb_ast_t*);
8363void rb_ast_update_references(rb_ast_t*);
8364void rb_ast_add_local_table(rb_ast_t*, ID *buf);
8365void rb_ast_dispose(rb_ast_t*);
8366void rb_ast_free(rb_ast_t*);
8367size_t rb_ast_memsize(const rb_ast_t*);
8368void rb_ast_add_mark_object(rb_ast_t*, VALUE);
8369NODE *rb_ast_newnode(rb_ast_t*, enum node_type type);
8370void rb_ast_delete_node(rb_ast_t*, NODE *n);
8371VALUE rb_parser_new(void);
8372VALUE rb_parser_end_seen_p(VALUE);
8373VALUE rb_parser_encoding(VALUE);
8374VALUE rb_parser_set_yydebug(VALUE, VALUE);
8375VALUE rb_parser_dump_tree(const NODE *node, int comment);
8376void rb_parser_set_options(VALUE, int, int, int, int);
8377rb_ast_t *rb_parser_compile_string(VALUE, const char*, VALUE, int);
8378rb_ast_t *rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line);
8379rb_ast_t *rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line);
8380rb_ast_t *rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int line);
8381void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2);
8382const char *ruby_node_name(int node);
8383const struct kwtable *rb_reserved_word(const char *, unsigned int);
8384struct rb_args_info {
8385 NODE *pre_init;
8386 NODE *post_init;
8387 int pre_args_num;
8388 int post_args_num;
8389 ID first_post_arg;
8390 ID rest_arg;
8391 ID block_arg;
8392 NODE *kw_args;
8393 NODE *kw_rest_arg;
8394 NODE *opt_args;
8395 unsigned int no_kwarg: 1;
8396 unsigned int ruby2_keywords: 1;
8397 VALUE imemo;
8398};
8399struct rb_ary_pattern_info {
8400 NODE *pre_args;
8401 NODE *rest_arg;
8402 NODE *post_args;
8403};
8404struct rb_fnd_pattern_info {
8405 NODE *pre_rest_arg;
8406 NODE *args;
8407 NODE *post_rest_arg;
8408};
8409struct parser_params;
8410void *rb_parser_malloc(struct parser_params *, size_t);
8411void *rb_parser_realloc(struct parser_params *, void *, size_t);
8412void *rb_parser_calloc(struct parser_params *, size_t, size_t);
8413void rb_parser_free(struct parser_params *, void *);
8414__attribute__((__format__(__printf__, (2), (3)))) void rb_parser_printf(struct parser_params *parser, const char *fmt, ...);
8415void rb_ast_node_type_change(NODE *n, enum node_type type);
8416
8417
8418static inline VALUE
8419rb_node_set_type(NODE *n, enum node_type t)
8420{
8421 return (n)->flags=(((n)->flags&~(((VALUE)0x7f)<<8))|((((unsigned long)(t))<<8)&(((VALUE)0x7f)<<8)));
8422}
8423typedef unsigned int rb_atomic_t;
8424struct sched_param
8425{
8426 int sched_priority;
8427};
8428
8429extern int clone (int (*__fn) (void *__arg), void *__child_stack,
8430 int __flags, void *__arg, ...) __attribute__ ((__nothrow__ , __leaf__));
8431extern int unshare (int __flags) __attribute__ ((__nothrow__ , __leaf__));
8432extern int sched_getcpu (void) __attribute__ ((__nothrow__ , __leaf__));
8433extern int getcpu (unsigned int *, unsigned int *) __attribute__ ((__nothrow__ , __leaf__));
8434extern int setns (int __fd, int __nstype) __attribute__ ((__nothrow__ , __leaf__));
8435
8436typedef unsigned long int __cpu_mask;
8437typedef struct
8438{
8439 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
8440} cpu_set_t;
8441
8442extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
8443 __attribute__ ((__nothrow__ , __leaf__));
8444extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
8445extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ , __leaf__));
8446
8447
8448extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
8449 __attribute__ ((__nothrow__ , __leaf__));
8450extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
8451extern int sched_setscheduler (__pid_t __pid, int __policy,
8452 const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
8453extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
8454extern int sched_yield (void) __attribute__ ((__nothrow__ , __leaf__));
8455extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
8456extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
8457extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ , __leaf__));
8458extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
8459 const cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__));
8460extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
8461 cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__));
8462
8463enum
8464{
8465 PTHREAD_CREATE_JOINABLE,
8466 PTHREAD_CREATE_DETACHED
8467};
8468enum
8469{
8470 PTHREAD_MUTEX_TIMED_NP,
8471 PTHREAD_MUTEX_RECURSIVE_NP,
8472 PTHREAD_MUTEX_ERRORCHECK_NP,
8473 PTHREAD_MUTEX_ADAPTIVE_NP
8474 ,
8475 PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
8476 PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
8477 PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
8478 PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
8479 , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP
8480};
8481enum
8482{
8483 PTHREAD_MUTEX_STALLED,
8484 PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
8485 PTHREAD_MUTEX_ROBUST,
8486 PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
8487};
8488enum
8489{
8490 PTHREAD_PRIO_NONE,
8491 PTHREAD_PRIO_INHERIT,
8492 PTHREAD_PRIO_PROTECT
8493};
8494enum
8495{
8496 PTHREAD_RWLOCK_PREFER_READER_NP,
8497 PTHREAD_RWLOCK_PREFER_WRITER_NP,
8498 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
8499 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
8500};
8501enum
8502{
8503 PTHREAD_INHERIT_SCHED,
8504 PTHREAD_EXPLICIT_SCHED
8505};
8506enum
8507{
8508 PTHREAD_SCOPE_SYSTEM,
8509 PTHREAD_SCOPE_PROCESS
8510};
8511enum
8512{
8513 PTHREAD_PROCESS_PRIVATE,
8514 PTHREAD_PROCESS_SHARED
8515};
8517{
8518 void (*__routine) (void *);
8519 void *__arg;
8520 int __canceltype;
8521 struct _pthread_cleanup_buffer *__prev;
8522};
8523enum
8524{
8525 PTHREAD_CANCEL_ENABLE,
8526 PTHREAD_CANCEL_DISABLE
8527};
8528enum
8529{
8530 PTHREAD_CANCEL_DEFERRED,
8531 PTHREAD_CANCEL_ASYNCHRONOUS
8532};
8533
8534extern int pthread_create (pthread_t *__restrict __newthread,
8535 const pthread_attr_t *__restrict __attr,
8536 void *(*__start_routine) (void *),
8537 void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
8538extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
8539extern int pthread_join (pthread_t __th, void **__thread_return);
8540extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __attribute__ ((__nothrow__ , __leaf__));
8541extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
8542 const struct timespec *__abstime);
8543extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return,
8544 clockid_t __clockid,
8545 const struct timespec *__abstime);
8546extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ , __leaf__));
8547extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
8548extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)
8549 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
8550extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8551extern int pthread_attr_destroy (pthread_attr_t *__attr)
8552 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8553extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
8554 int *__detachstate)
8555 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8556extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
8557 int __detachstate)
8558 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8559extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,
8560 size_t *__guardsize)
8561 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8562extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
8563 size_t __guardsize)
8564 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8565extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,
8566 struct sched_param *__restrict __param)
8567 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8568extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
8569 const struct sched_param *__restrict
8570 __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8571extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
8572 __attr, int *__restrict __policy)
8573 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8574extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
8575 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8576extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
8577 __attr, int *__restrict __inherit)
8578 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8579extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
8580 int __inherit)
8581 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8582extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
8583 int *__restrict __scope)
8584 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8585extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
8586 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8587extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
8588 __attr, void **__restrict __stackaddr)
8589 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
8590extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
8591 void *__stackaddr)
8592 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
8593extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
8594 __attr, size_t *__restrict __stacksize)
8595 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8596extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
8597 size_t __stacksize)
8598 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8599extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
8600 void **__restrict __stackaddr,
8601 size_t *__restrict __stacksize)
8602 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
8603extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
8604 size_t __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8605extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
8606 size_t __cpusetsize,
8607 const cpu_set_t *__cpuset)
8608 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
8609extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr,
8610 size_t __cpusetsize,
8611 cpu_set_t *__cpuset)
8612 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
8613extern int pthread_getattr_default_np (pthread_attr_t *__attr)
8614 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8615extern int pthread_attr_setsigmask_np (pthread_attr_t *__attr,
8616 const __sigset_t *sigmask);
8617extern int pthread_attr_getsigmask_np (const pthread_attr_t *__attr,
8618 __sigset_t *sigmask);
8619extern int pthread_setattr_default_np (const pthread_attr_t *__attr)
8620 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8621extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr)
8622 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
8623extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
8624 const struct sched_param *__param)
8625 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
8626extern int pthread_getschedparam (pthread_t __target_thread,
8627 int *__restrict __policy,
8628 struct sched_param *__restrict __param)
8629 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
8630extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
8631 __attribute__ ((__nothrow__ , __leaf__));
8632extern int pthread_getname_np (pthread_t __target_thread, char *__buf,
8633 size_t __buflen)
8634 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
8635extern int pthread_setname_np (pthread_t __target_thread, const char *__name)
8636 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
8637extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__ , __leaf__));
8638extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__ , __leaf__));
8639extern int pthread_yield (void) __attribute__ ((__nothrow__ , __leaf__));
8640extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
8641 const cpu_set_t *__cpuset)
8642 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
8643extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize,
8644 cpu_set_t *__cpuset)
8645 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
8646extern int pthread_once (pthread_once_t *__once_control,
8647 void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
8648extern int pthread_setcancelstate (int __state, int *__oldstate);
8649extern int pthread_setcanceltype (int __type, int *__oldtype);
8650extern int pthread_cancel (pthread_t __th);
8651extern void pthread_testcancel (void);
8653{
8654 __jmp_buf __cancel_jmp_buf;
8655 int __mask_was_saved;
8656};
8657typedef struct
8658{
8659 struct __cancel_jmp_buf_tag __cancel_jmp_buf[1];
8660 void *__pad[4];
8661} __pthread_unwind_buf_t __attribute__ ((__aligned__));
8663{
8664 void (*__cancel_routine) (void *);
8665 void *__cancel_arg;
8666 int __do_it;
8667 int __cancel_type;
8668};
8669extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
8670 ;
8671extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
8672 ;
8673extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf)
8674 ;
8675extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf)
8676 ;
8677extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
8678 __attribute__ ((__noreturn__))
8679 __attribute__ ((__weak__))
8680 ;
8681extern int __sigsetjmp_cancel (struct __cancel_jmp_buf_tag __env[1], int __savemask) __asm__ ("" "__sigsetjmp") __attribute__ ((__nothrow__)) __attribute__ ((__returns_twice__));
8682extern int pthread_mutex_init (pthread_mutex_t *__mutex,
8683 const pthread_mutexattr_t *__mutexattr)
8684 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8685extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
8686 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8687extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
8688 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
8689extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
8690 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
8691extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
8692 const struct timespec *__restrict
8693 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
8694extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,
8695 clockid_t __clockid,
8696 const struct timespec *__restrict
8697 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
8698extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
8699 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
8700extern int pthread_mutex_getprioceiling (const pthread_mutex_t *
8701 __restrict __mutex,
8702 int *__restrict __prioceiling)
8703 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8704extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
8705 int __prioceiling,
8706 int *__restrict __old_ceiling)
8707 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
8708extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
8709 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8710extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
8711 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8712extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
8713 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8714extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
8715 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8716extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
8717 __restrict __attr,
8718 int *__restrict __pshared)
8719 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8720extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
8721 int __pshared)
8722 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8723extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
8724 __attr, int *__restrict __kind)
8725 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8726extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
8727 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8728extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *
8729 __restrict __attr,
8730 int *__restrict __protocol)
8731 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8732extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
8733 int __protocol)
8734 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8735extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *
8736 __restrict __attr,
8737 int *__restrict __prioceiling)
8738 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8739extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
8740 int __prioceiling)
8741 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8742extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
8743 int *__robustness)
8744 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8745extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr,
8746 int *__robustness)
8747 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8748extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
8749 int __robustness)
8750 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8751extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
8752 int __robustness)
8753 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8754extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
8755 const pthread_rwlockattr_t *__restrict
8756 __attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8757extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
8758 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8759extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
8760 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
8761extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
8762 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
8763extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
8764 const struct timespec *__restrict
8765 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
8766extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,
8767 clockid_t __clockid,
8768 const struct timespec *__restrict
8769 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
8770extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
8771 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
8772extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
8773 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
8774extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
8775 const struct timespec *__restrict
8776 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
8777extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,
8778 clockid_t __clockid,
8779 const struct timespec *__restrict
8780 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
8781extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
8782 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
8783extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
8784 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8785extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
8786 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8787extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
8788 __restrict __attr,
8789 int *__restrict __pshared)
8790 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8791extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
8792 int __pshared)
8793 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8794extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *
8795 __restrict __attr,
8796 int *__restrict __pref)
8797 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8798extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
8799 int __pref) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8800extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
8801 const pthread_condattr_t *__restrict __cond_attr)
8802 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8803extern int pthread_cond_destroy (pthread_cond_t *__cond)
8804 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8805extern int pthread_cond_signal (pthread_cond_t *__cond)
8806 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
8807extern int pthread_cond_broadcast (pthread_cond_t *__cond)
8808 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
8809extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
8810 pthread_mutex_t *__restrict __mutex)
8811 __attribute__ ((__nonnull__ (1, 2)));
8812extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
8813 pthread_mutex_t *__restrict __mutex,
8814 const struct timespec *__restrict __abstime)
8815 __attribute__ ((__nonnull__ (1, 2, 3)));
8816extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,
8817 pthread_mutex_t *__restrict __mutex,
8818 __clockid_t __clock_id,
8819 const struct timespec *__restrict __abstime)
8820 __attribute__ ((__nonnull__ (1, 2, 4)));
8821extern int pthread_condattr_init (pthread_condattr_t *__attr)
8822 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8823extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
8824 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8825extern int pthread_condattr_getpshared (const pthread_condattr_t *
8826 __restrict __attr,
8827 int *__restrict __pshared)
8828 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8829extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
8830 int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8831extern int pthread_condattr_getclock (const pthread_condattr_t *
8832 __restrict __attr,
8833 __clockid_t *__restrict __clock_id)
8834 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8835extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
8836 __clockid_t __clock_id)
8837 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8838extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
8839 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8840extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
8841 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8842extern int pthread_spin_lock (pthread_spinlock_t *__lock)
8843 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
8844extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
8845 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
8846extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
8847 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
8848extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
8849 const pthread_barrierattr_t *__restrict
8850 __attr, unsigned int __count)
8851 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8852extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
8853 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8854extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
8855 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
8856extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
8857 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8858extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
8859 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8860extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
8861 __restrict __attr,
8862 int *__restrict __pshared)
8863 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8864extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
8865 int __pshared)
8866 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8867extern int pthread_key_create (pthread_key_t *__key,
8868 void (*__destr_function) (void *))
8869 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8870extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
8871extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
8872extern int pthread_setspecific (pthread_key_t __key,
8873 const void *__pointer) __attribute__ ((__nothrow__ , __leaf__)) ;
8874extern int pthread_getcpuclockid (pthread_t __thread_id,
8875 __clockid_t *__clock_id)
8876 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
8877extern int pthread_atfork (void (*__prepare) (void),
8878 void (*__parent) (void),
8879 void (*__child) (void)) __attribute__ ((__nothrow__ , __leaf__));
8880extern __inline __attribute__ ((__gnu_inline__)) int
8881__attribute__ ((__nothrow__ , __leaf__)) pthread_equal (pthread_t __thread1, pthread_t __thread2)
8882{
8883 return __thread1 == __thread2;
8884}
8885
8886typedef pthread_t rb_nativethread_id_t;
8889
8890
8891rb_nativethread_id_t rb_nativethread_self();
8904void rb_native_cond_timedwait(rb_nativethread_cond_t *cond, rb_nativethread_lock_t *mutex, unsigned long msec);
8907
8908
8909typedef struct native_thread_data_struct {
8910 union {
8911 struct list_node ubf;
8912 struct list_node gvl;
8913 } node;
8914 union
8915 {
8918 } cond;
8920typedef struct rb_global_vm_lock_struct {
8921 const struct rb_thread_struct *owner;
8923 struct list_head waitq;
8924 const struct rb_thread_struct *timer;
8925 int timer_err;
8926 rb_nativethread_cond_t switch_cond;
8927 rb_nativethread_cond_t switch_wait_cond;
8928 int need_yield;
8929 int wait_yield;
8931
8932
8933 extern __thread struct rb_execution_context_struct *ruby_current_ec;
8934
8935
8936void *rb_allocate_sigaltstack(void);
8937void *rb_register_sigaltstack(void *);
8938void rb_vm_encoded_insn_data_table_init(void);
8939typedef unsigned long rb_num_t;
8940typedef signed long rb_snum_t;
8941enum ruby_tag_type {
8942 RUBY_TAG_NONE = 0x0,
8943 RUBY_TAG_RETURN = 0x1,
8944 RUBY_TAG_BREAK = 0x2,
8945 RUBY_TAG_NEXT = 0x3,
8946 RUBY_TAG_RETRY = 0x4,
8947 RUBY_TAG_REDO = 0x5,
8948 RUBY_TAG_RAISE = 0x6,
8949 RUBY_TAG_THROW = 0x7,
8950 RUBY_TAG_FATAL = 0x8,
8951 RUBY_TAG_MASK = 0xf
8952};
8953enum ruby_vm_throw_flags {
8954 VM_THROW_NO_ESCAPE_FLAG = 0x8000,
8955 VM_THROW_STATE_MASK = 0xff
8956};
8957struct rb_thread_struct;
8961 VALUE flags;
8962 VALUE value;
8963 const rb_cref_t *ic_cref;
8964 rb_serial_t ic_serial;
8965};
8968};
8970 struct rb_iv_index_tbl_entry *entry;
8971};
8973 struct {
8974 struct rb_thread_struct *running_thread;
8975 VALUE value;
8976 } once;
8977 struct iseq_inline_constant_cache ic_cache;
8978 struct iseq_inline_iv_cache_entry iv_cache;
8979};
8980struct rb_calling_info {
8981 const struct rb_callinfo *ci;
8982 const struct rb_callcache *cc;
8983 VALUE block_handler;
8984 VALUE recv;
8985 int argc;
8986 int kw_splat;
8987};
8989typedef struct rb_iseq_location_struct {
8990 VALUE pathobj;
8991 VALUE base_label;
8992 VALUE label;
8993 VALUE first_lineno;
8994 int node_id;
8995 rb_code_location_t code_location;
8997static inline VALUE
8998pathobj_path(VALUE pathobj)
8999{
9000 if (RB_TYPE_P(pathobj, RUBY_T_STRING)) {
9001 return pathobj;
9002 }
9003 else {
9004 ((void)0);
9005 return RARRAY_AREF(pathobj, 0);
9006 }
9007}
9008static inline VALUE
9009pathobj_realpath(VALUE pathobj)
9010{
9011 if (RB_TYPE_P(pathobj, RUBY_T_STRING)) {
9012 return pathobj;
9013 }
9014 else {
9015 ((void)0);
9016 return RARRAY_AREF(pathobj, 1);
9017 }
9018}
9019struct rb_mjit_unit;
9020struct rb_iseq_constant_body {
9021 enum iseq_type {
9022 ISEQ_TYPE_TOP,
9023 ISEQ_TYPE_METHOD,
9024 ISEQ_TYPE_BLOCK,
9025 ISEQ_TYPE_CLASS,
9026 ISEQ_TYPE_RESCUE,
9027 ISEQ_TYPE_ENSURE,
9028 ISEQ_TYPE_EVAL,
9029 ISEQ_TYPE_MAIN,
9030 ISEQ_TYPE_PLAIN
9031 } type;
9032 unsigned int iseq_size;
9033 VALUE *iseq_encoded;
9034 struct {
9035 struct {
9036 unsigned int has_lead : 1;
9037 unsigned int has_opt : 1;
9038 unsigned int has_rest : 1;
9039 unsigned int has_post : 1;
9040 unsigned int has_kw : 1;
9041 unsigned int has_kwrest : 1;
9042 unsigned int has_block : 1;
9043 unsigned int ambiguous_param0 : 1;
9044 unsigned int accepts_no_kwarg : 1;
9045 unsigned int ruby2_keywords: 1;
9046 } flags;
9047 unsigned int size;
9048 int lead_num;
9049 int opt_num;
9050 int rest_start;
9051 int post_start;
9052 int post_num;
9053 int block_start;
9054 const VALUE *opt_table;
9055 const struct rb_iseq_param_keyword {
9056 int num;
9057 int required_num;
9058 int bits_start;
9059 int rest_start;
9060 const ID *table;
9061 VALUE *default_values;
9062 } *keyword;
9063 } param;
9064 rb_iseq_location_t location;
9065 struct iseq_insn_info {
9066 const struct iseq_insn_info_entry *body;
9067 unsigned int *positions;
9068 unsigned int size;
9070 } insns_info;
9071 const ID *local_table;
9072 struct iseq_catch_table *catch_table;
9073 const struct rb_iseq_struct *parent_iseq;
9074 struct rb_iseq_struct *local_iseq;
9075 union iseq_inline_storage_entry *is_entries;
9076 struct rb_call_data *call_data;
9077 struct {
9078 rb_snum_t flip_count;
9079 VALUE coverage;
9080 VALUE pc2branchindex;
9081 VALUE *original_iseq;
9082 } variable;
9083 unsigned int local_table_size;
9084 unsigned int is_size;
9085 unsigned int ci_size;
9086 unsigned int stack_max;
9087 char catch_except_p;
9088 _Bool builtin_inline_p;
9089 struct rb_id_table *outer_variables;
9090 VALUE (*jit_func)(struct rb_execution_context_struct *,
9091 struct rb_control_frame_struct *);
9092 long unsigned total_calls;
9093 struct rb_mjit_unit *jit_unit;
9094};
9095struct rb_iseq_struct {
9096 VALUE flags;
9097 VALUE wrapper;
9098 struct rb_iseq_constant_body *body;
9099 union {
9100 struct iseq_compile_data *compile_data;
9101 struct {
9102 VALUE obj;
9103 int index;
9104 } loader;
9105 struct {
9106 struct rb_hook_list_struct *local_hooks;
9107 rb_event_flag_t global_trace_events;
9108 } exec;
9109 } aux;
9110};
9111static inline const rb_iseq_t *
9112rb_iseq_check(const rb_iseq_t *iseq)
9113{
9114 return iseq;
9115}
9116static inline const rb_iseq_t *
9117def_iseq_ptr(rb_method_definition_t *def)
9118{
9119 return rb_iseq_check(def->body.iseq.iseqptr);
9120}
9121enum ruby_special_exceptions {
9122 ruby_error_reenter,
9123 ruby_error_nomemory,
9124 ruby_error_sysstack,
9125 ruby_error_stackfatal,
9126 ruby_error_stream_closed,
9127 ruby_special_error_count
9128};
9129enum ruby_basic_operators {
9130 BOP_PLUS,
9131 BOP_MINUS,
9132 BOP_MULT,
9133 BOP_DIV,
9134 BOP_MOD,
9135 BOP_EQ,
9136 BOP_EQQ,
9137 BOP_LT,
9138 BOP_LE,
9139 BOP_LTLT,
9140 BOP_AREF,
9141 BOP_ASET,
9142 BOP_LENGTH,
9143 BOP_SIZE,
9144 BOP_EMPTY_P,
9145 BOP_NIL_P,
9146 BOP_SUCC,
9147 BOP_GT,
9148 BOP_GE,
9149 BOP_NOT,
9150 BOP_NEQ,
9151 BOP_MATCH,
9152 BOP_FREEZE,
9153 BOP_UMINUS,
9154 BOP_MAX,
9155 BOP_MIN,
9156 BOP_CALL,
9157 BOP_AND,
9158 BOP_OR,
9159 BOP_LAST_
9160};
9161struct rb_vm_struct;
9162typedef void rb_vm_at_exit_func(struct rb_vm_struct*);
9163typedef struct rb_at_exit_list {
9164 rb_vm_at_exit_func *func;
9165 struct rb_at_exit_list *next;
9167struct rb_objspace;
9168struct rb_objspace *rb_objspace_alloc(void);
9169void rb_objspace_free(struct rb_objspace *);
9170void rb_objspace_call_finalizer(struct rb_objspace *);
9171typedef struct rb_hook_list_struct {
9172 struct rb_event_hook_struct *hooks;
9173 rb_event_flag_t events;
9174 unsigned int need_clean;
9175 unsigned int running;
9177typedef const struct rb_builtin_function *RB_BUILTIN;
9178typedef struct rb_vm_struct {
9179 VALUE self;
9180 struct {
9181 struct list_head set;
9182 unsigned int cnt;
9183 unsigned int blocking_cnt;
9184 struct rb_ractor_struct *main_ractor;
9185 struct rb_thread_struct *main_thread;
9186 struct {
9188 struct rb_ractor_struct *lock_owner;
9189 unsigned int lock_rec;
9190 _Bool barrier_waiting;
9191 unsigned int barrier_cnt;
9192 rb_nativethread_cond_t barrier_cond;
9193 rb_nativethread_cond_t terminate_cond;
9194 _Bool terminate_waiting;
9195 } sync;
9196 } ractor;
9197 void *main_altstack;
9198 rb_serial_t fork_gen;
9199 rb_nativethread_lock_t waitpid_lock;
9200 struct list_head waiting_pids;
9201 struct list_head waiting_grps;
9202 struct list_head waiting_fds;
9203 volatile int ubf_async_safe;
9204 unsigned int running: 1;
9205 unsigned int thread_abort_on_exception: 1;
9206 unsigned int thread_report_on_exception: 1;
9207 unsigned int thread_ignore_deadlock: 1;
9208 VALUE mark_object_ary;
9209 const VALUE special_exceptions[ruby_special_error_count];
9210 VALUE top_self;
9211 VALUE load_path;
9212 VALUE load_path_snapshot;
9213 VALUE load_path_check_cache;
9214 VALUE expanded_load_path;
9215 VALUE loaded_features;
9216 VALUE loaded_features_snapshot;
9217 struct st_table *loaded_features_index;
9218 struct st_table *loading_table;
9219 struct {
9220 VALUE cmd[(64 + 1)];
9221 } trap_list;
9222 struct st_table *ensure_rollback_table;
9223 struct rb_postponed_job_struct *postponed_job_buffer;
9224 rb_atomic_t postponed_job_index;
9225 int src_encoding_index;
9226 struct list_head workqueue;
9227 rb_nativethread_lock_t workqueue_lock;
9228 VALUE orig_progname, progname;
9229 VALUE coverages;
9230 int coverage_mode;
9231 st_table * defined_module_hash;
9232 struct rb_objspace *objspace;
9233 rb_at_exit_list *at_exit;
9234 VALUE *defined_strings;
9235 st_table *frozen_strings;
9236 const struct rb_builtin_function *builtin_function_table;
9237 int builtin_inline_index;
9238 struct rb_id_table *negative_cme_table;
9239 const struct rb_callcache *global_cc_cache_table[1023];
9240 struct {
9241 size_t thread_vm_stack_size;
9242 size_t thread_machine_stack_size;
9243 size_t fiber_vm_stack_size;
9244 size_t fiber_machine_stack_size;
9245 } default_params;
9246 short redefined_flag[BOP_LAST_];
9247} rb_vm_t;
9248struct rb_captured_block {
9249 VALUE self;
9250 const VALUE *ep;
9251 union {
9252 const rb_iseq_t *iseq;
9253 const struct vm_ifunc *ifunc;
9254 VALUE val;
9255 } code;
9256};
9257enum rb_block_handler_type {
9258 block_handler_type_iseq,
9259 block_handler_type_ifunc,
9260 block_handler_type_symbol,
9261 block_handler_type_proc
9262};
9263enum rb_block_type {
9264 block_type_iseq,
9265 block_type_ifunc,
9266 block_type_symbol,
9267 block_type_proc
9268};
9269struct rb_block {
9270 union {
9271 struct rb_captured_block captured;
9272 VALUE symbol;
9273 VALUE proc;
9274 } as;
9275 enum rb_block_type type;
9276};
9277typedef struct rb_control_frame_struct {
9278 const VALUE *pc;
9279 VALUE *sp;
9280 const rb_iseq_t *iseq;
9281 VALUE self;
9282 const VALUE *ep;
9283 const void *block_code;
9284 VALUE *__bp__;
9286extern const rb_data_type_t ruby_threadptr_data_type;
9287static inline struct rb_thread_struct *
9288rb_thread_ptr(VALUE thval)
9289{
9290 return (struct rb_thread_struct *)rb_check_typeddata(thval, &ruby_threadptr_data_type);
9291}
9292enum rb_thread_status {
9293 THREAD_RUNNABLE,
9294 THREAD_STOPPED,
9295 THREAD_STOPPED_FOREVER,
9296 THREAD_KILLED
9297};
9298typedef void *rb_jmpbuf_t[5];
9299struct rb_vm_tag {
9300 VALUE tag;
9301 VALUE retval;
9302 rb_jmpbuf_t buf;
9303 struct rb_vm_tag *prev;
9304 enum ruby_tag_type state;
9305 unsigned int lock_rec;
9306};
9307__extension__ _Static_assert(__builtin_offsetof (struct rb_vm_tag, buf) > 0, "rb_vm_tag_buf_offset" ": " "offsetof(struct rb_vm_tag, buf) > 0");
9308__extension__ _Static_assert(__builtin_offsetof (struct rb_vm_tag, buf) + sizeof(rb_jmpbuf_t) < sizeof(struct rb_vm_tag), "rb_vm_tag_buf_end" ": " "offsetof(struct rb_vm_tag, buf) + sizeof(rb_jmpbuf_t) < sizeof(struct rb_vm_tag)");
9309struct rb_vm_protect_tag {
9310 struct rb_vm_protect_tag *prev;
9311};
9312struct rb_unblock_callback {
9314 void *arg;
9315};
9316struct rb_mutex_struct;
9317typedef struct rb_ensure_entry {
9318 VALUE marker;
9319 VALUE (*e_proc)(VALUE);
9320 VALUE data2;
9322typedef struct rb_ensure_list {
9323 struct rb_ensure_list *next;
9324 struct rb_ensure_entry entry;
9326typedef char rb_thread_id_string_t[sizeof(rb_nativethread_id_t) * 2 + 3];
9327typedef struct rb_fiber_struct rb_fiber_t;
9329 struct rb_waiting_list *next;
9330 struct rb_thread_struct *thread;
9331 struct rb_fiber_struct *fiber;
9332};
9334 VALUE *vm_stack;
9335 size_t vm_stack_size;
9336 rb_control_frame_t *cfp;
9337 struct rb_vm_tag *tag;
9338 struct rb_vm_protect_tag *protect_tag;
9339 rb_atomic_t interrupt_flag;
9340 rb_atomic_t interrupt_mask;
9341 rb_fiber_t *fiber_ptr;
9342 struct rb_thread_struct *thread_ptr;
9343 struct rb_id_table *local_storage;
9344 VALUE local_storage_recursive_hash;
9345 VALUE local_storage_recursive_hash_for_trace;
9346 const VALUE *root_lep;
9347 VALUE root_svar;
9348 rb_ensure_list_t *ensure_list;
9349 struct rb_trace_arg_struct *trace_arg;
9350 VALUE errinfo;
9351 VALUE passed_block_handler;
9352 uint8_t raised_flag;
9353 enum method_missing_reason method_missing_reason : 8;
9354 VALUE private_const_reference;
9355 struct {
9356 VALUE *stack_start;
9357 VALUE *stack_end;
9358 size_t stack_maxsize;
9359 __attribute__((__aligned__(8))) jmp_buf regs;
9360 } machine;
9361};
9363void rb_ec_set_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size);
9364void rb_ec_initialize_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size);
9365void rb_ec_clear_vm_stack(rb_execution_context_t *ec);
9367 _Bool ractor_safe;
9368};
9369typedef struct rb_ractor_struct rb_ractor_t;
9370typedef struct rb_thread_struct {
9371 struct list_node lt_node;
9372 VALUE self;
9373 rb_ractor_t *ractor;
9374 rb_vm_t *vm;
9376 VALUE last_status;
9377 struct rb_calling_info *calling;
9378 VALUE top_self;
9379 VALUE top_wrapper;
9380 rb_nativethread_id_t thread_id;
9381 enum rb_thread_status status : 2;
9382 unsigned int to_kill : 1;
9383 unsigned int abort_on_exception: 1;
9384 unsigned int report_on_exception: 1;
9385 unsigned int pending_interrupt_queue_checked: 1;
9386 int8_t priority;
9387 uint32_t running_time_us;
9388 native_thread_data_t native_thread_data;
9389 void *blocking_region_buffer;
9390 VALUE thgroup;
9391 VALUE value;
9392 VALUE pending_interrupt_queue;
9393 VALUE pending_interrupt_mask_stack;
9394 rb_nativethread_lock_t interrupt_lock;
9395 struct rb_unblock_callback unblock;
9396 VALUE locking_mutex;
9397 struct rb_mutex_struct *keeping_mutexes;
9398 struct rb_waiting_list *join_list;
9399 union {
9400 struct {
9401 VALUE proc;
9402 VALUE args;
9403 int kw_splat;
9404 } proc;
9405 struct {
9406 VALUE (*func)(void *);
9407 void *arg;
9408 } func;
9409 } invoke_arg;
9410 enum thread_invoke_type {
9411 thread_invoke_type_none = 0,
9412 thread_invoke_type_proc,
9413 thread_invoke_type_ractor_proc,
9414 thread_invoke_type_func
9415 } invoke_type;
9416 VALUE stat_insn_usage;
9417 rb_fiber_t *root_fiber;
9418 rb_jmpbuf_t root_jmpbuf;
9419 VALUE scheduler;
9420 unsigned blocking;
9421 VALUE name;
9422 struct rb_ext_config ext_config;
9423 void *altstack;
9424} rb_thread_t;
9425typedef enum {
9426 VM_DEFINECLASS_TYPE_CLASS = 0x00,
9427 VM_DEFINECLASS_TYPE_SINGLETON_CLASS = 0x01,
9428 VM_DEFINECLASS_TYPE_MODULE = 0x02,
9429 VM_DEFINECLASS_TYPE_MASK = 0x07
9430} rb_vm_defineclass_type_t;
9431
9432
9433rb_iseq_t *rb_iseq_new (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum iseq_type);
9434rb_iseq_t *rb_iseq_new_top (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent);
9435rb_iseq_t *rb_iseq_new_main (const rb_ast_body_t *ast, VALUE path, VALUE realpath, const rb_iseq_t *parent);
9436rb_iseq_t *rb_iseq_new_eval (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_iseq_t *parent, int isolated_depth);
9437rb_iseq_t *rb_iseq_new_with_opt(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_iseq_t *parent, int isolated_depth,
9438 enum iseq_type, const rb_compile_option_t*);
9439struct iseq_link_anchor;
9441 VALUE flags;
9442 VALUE reserved;
9443 void (*func)(rb_iseq_t *, struct iseq_link_anchor *, const void *);
9444 const void *data;
9445};
9446static inline struct rb_iseq_new_with_callback_callback_func *
9447rb_iseq_new_with_callback_new_callback(
9448 void (*func)(rb_iseq_t *, struct iseq_link_anchor *, const void *), const void *ptr)
9449{
9450 VALUE memo = rb_imemo_new(imemo_ifunc, (VALUE)func, (VALUE)ptr, ((VALUE)RUBY_Qundef), ((VALUE)RUBY_Qfalse));
9451 return (struct rb_iseq_new_with_callback_callback_func *)memo;
9452}
9453rb_iseq_t *rb_iseq_new_with_callback(const struct rb_iseq_new_with_callback_callback_func * ifunc,
9454 VALUE name, VALUE path, VALUE realpath, VALUE first_lineno,
9455 const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t*);
9456VALUE rb_iseq_disasm(const rb_iseq_t *iseq);
9457int rb_iseq_disasm_insn(VALUE str, const VALUE *iseqval, size_t pos, const rb_iseq_t *iseq, VALUE child);
9458VALUE rb_iseq_coverage(const rb_iseq_t *iseq);
9459extern VALUE rb_cISeq;
9460extern VALUE rb_cRubyVM;
9461extern VALUE rb_mRubyVMFrozenCore;
9462extern VALUE rb_block_param_proxy;
9463
9464
9465typedef struct {
9466 const struct rb_block block;
9467 unsigned int is_from_method: 1;
9468 unsigned int is_lambda: 1;
9469 unsigned int is_isolated: 1;
9470} rb_proc_t;
9471
9472
9473VALUE rb_proc_isolate(VALUE self);
9474VALUE rb_proc_isolate_bang(VALUE self);
9475VALUE rb_proc_ractor_make_shareable(VALUE self);
9476
9477
9478typedef struct {
9479 VALUE flags;
9480 rb_iseq_t *iseq;
9481 const VALUE *ep;
9482 const VALUE *env;
9483 unsigned int env_size;
9484} rb_env_t;
9485extern const rb_data_type_t ruby_binding_data_type;
9486typedef struct {
9487 const struct rb_block block;
9488 const VALUE pathobj;
9489 unsigned short first_lineno;
9490} rb_binding_t;
9491enum vm_check_match_type {
9492 VM_CHECKMATCH_TYPE_WHEN = 1,
9493 VM_CHECKMATCH_TYPE_CASE = 2,
9494 VM_CHECKMATCH_TYPE_RESCUE = 3
9495};
9496enum vm_special_object_type {
9497 VM_SPECIAL_OBJECT_VMCORE = 1,
9498 VM_SPECIAL_OBJECT_CBASE,
9499 VM_SPECIAL_OBJECT_CONST_BASE
9500};
9501enum vm_svar_index {
9502 VM_SVAR_LASTLINE = 0,
9503 VM_SVAR_BACKREF = 1,
9504 VM_SVAR_EXTRA_START = 2,
9505 VM_SVAR_FLIPFLOP_START = 2
9506};
9507typedef struct iseq_inline_constant_cache *IC;
9508typedef struct iseq_inline_iv_cache_entry *IVC;
9509typedef union iseq_inline_storage_entry *ISE;
9510typedef const struct rb_callinfo *CALL_INFO;
9511typedef const struct rb_callcache *CALL_CACHE;
9512typedef struct rb_call_data *CALL_DATA;
9513typedef VALUE CDHASH;
9514typedef rb_control_frame_t *
9515 (*rb_insn_func_t)(rb_execution_context_t *, rb_control_frame_t *);
9516enum {
9517 VM_FRAME_MAGIC_METHOD = 0x11110001,
9518 VM_FRAME_MAGIC_BLOCK = 0x22220001,
9519 VM_FRAME_MAGIC_CLASS = 0x33330001,
9520 VM_FRAME_MAGIC_TOP = 0x44440001,
9521 VM_FRAME_MAGIC_CFUNC = 0x55550001,
9522 VM_FRAME_MAGIC_IFUNC = 0x66660001,
9523 VM_FRAME_MAGIC_EVAL = 0x77770001,
9524 VM_FRAME_MAGIC_RESCUE = 0x78880001,
9525 VM_FRAME_MAGIC_DUMMY = 0x79990001,
9526 VM_FRAME_MAGIC_MASK = 0x7fff0001,
9527 VM_FRAME_FLAG_FINISH = 0x0020,
9528 VM_FRAME_FLAG_BMETHOD = 0x0040,
9529 VM_FRAME_FLAG_CFRAME = 0x0080,
9530 VM_FRAME_FLAG_LAMBDA = 0x0100,
9531 VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM = 0x0200,
9532 VM_FRAME_FLAG_CFRAME_KW = 0x0400,
9533 VM_FRAME_FLAG_PASSED = 0x0800,
9534 VM_ENV_FLAG_LOCAL = 0x0002,
9535 VM_ENV_FLAG_ESCAPED = 0x0004,
9536 VM_ENV_FLAG_WB_REQUIRED = 0x0008,
9537 VM_ENV_FLAG_ISOLATED = 0x0010,
9538};
9539static inline void VM_FORCE_WRITE_SPECIAL_CONST(const VALUE *ptr, VALUE special_const_value);
9540static inline void
9541VM_ENV_FLAGS_SET(const VALUE *ep, VALUE flag)
9542{
9543 VALUE flags = ep[( 0)];
9544 ((void)0);
9545 VM_FORCE_WRITE_SPECIAL_CONST(&ep[( 0)], flags | flag);
9546}
9547static inline void
9548VM_ENV_FLAGS_UNSET(const VALUE *ep, VALUE flag)
9549{
9550 VALUE flags = ep[( 0)];
9551 ((void)0);
9552 VM_FORCE_WRITE_SPECIAL_CONST(&ep[( 0)], flags & ~flag);
9553}
9554static inline unsigned long
9555VM_ENV_FLAGS(const VALUE *ep, long flag)
9556{
9557 VALUE flags = ep[( 0)];
9558 ((void)0);
9559 return flags & flag;
9560}
9561static inline unsigned long
9562VM_FRAME_TYPE(const rb_control_frame_t *cfp)
9563{
9564 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_MAGIC_MASK);
9565}
9566static inline int
9567VM_FRAME_LAMBDA_P(const rb_control_frame_t *cfp)
9568{
9569 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_LAMBDA) != 0;
9570}
9571static inline int
9572VM_FRAME_CFRAME_KW_P(const rb_control_frame_t *cfp)
9573{
9574 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME_KW) != 0;
9575}
9576static inline int
9577VM_FRAME_FINISHED_P(const rb_control_frame_t *cfp)
9578{
9579 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_FINISH) != 0;
9580}
9581static inline int
9582VM_FRAME_BMETHOD_P(const rb_control_frame_t *cfp)
9583{
9584 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_BMETHOD) != 0;
9585}
9586static inline int
9587rb_obj_is_iseq(VALUE iseq)
9588{
9589 return imemo_type_p(iseq, imemo_iseq);
9590}
9591static inline int
9592VM_FRAME_CFRAME_P(const rb_control_frame_t *cfp)
9593{
9594 int cframe_p = VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME) != 0;
9595 ((void)0);
9596 return cframe_p;
9597}
9598static inline int
9599VM_FRAME_RUBYFRAME_P(const rb_control_frame_t *cfp)
9600{
9601 return !VM_FRAME_CFRAME_P(cfp);
9602}
9603static inline int
9604VM_ENV_LOCAL_P(const VALUE *ep)
9605{
9606 return VM_ENV_FLAGS(ep, VM_ENV_FLAG_LOCAL) ? 1 : 0;
9607}
9608static inline const VALUE *
9609VM_ENV_PREV_EP(const VALUE *ep)
9610{
9611 ((void)0);
9612 return ((void *)(((ep[(-1)])) & ~0x03));
9613}
9614static inline VALUE
9615VM_ENV_BLOCK_HANDLER(const VALUE *ep)
9616{
9617 ((void)0);
9618 return ep[(-1)];
9619}
9620static inline int
9621VM_ENV_ESCAPED_P(const VALUE *ep)
9622{
9623 ((void)0);
9624 return VM_ENV_FLAGS(ep, VM_ENV_FLAG_ESCAPED) ? 1 : 0;
9625}
9626static inline VALUE
9627VM_ENV_ENVVAL(const VALUE *ep)
9628{
9629 VALUE envval = ep[( 1)];
9630 ((void)0);
9631 ((void)0);
9632 return envval;
9633}
9634static inline const rb_env_t *
9635VM_ENV_ENVVAL_PTR(const VALUE *ep)
9636{
9637 return (const rb_env_t *)VM_ENV_ENVVAL(ep);
9638}
9639static inline const rb_env_t *
9640vm_env_new(VALUE *env_ep, VALUE *env_body, unsigned int env_size, const rb_iseq_t *iseq)
9641{
9642 rb_env_t *env = (rb_env_t *)rb_imemo_new(imemo_env, (VALUE)env_ep, (VALUE)env_body, 0, (VALUE)iseq);
9643 env->env_size = env_size;
9644 env_ep[( 1)] = (VALUE)env;
9645 return env;
9646}
9647static inline void
9648VM_FORCE_WRITE(const VALUE *ptr, VALUE v)
9649{
9650 *((VALUE *)ptr) = v;
9651}
9652static inline void
9653VM_FORCE_WRITE_SPECIAL_CONST(const VALUE *ptr, VALUE special_const_value)
9654{
9655 ((void)0);
9656 VM_FORCE_WRITE(ptr, special_const_value);
9657}
9658static inline void
9659VM_STACK_ENV_WRITE(const VALUE *ep, int index, VALUE v)
9660{
9661 ((void)0);
9662 VM_FORCE_WRITE(&ep[index], v);
9663}static inline
9664const VALUE *rb_vm_ep_local_ep(const VALUE *ep);
9665const VALUE *rb_vm_proc_local_ep(VALUE proc);static inline
9666void rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep);
9667void rb_vm_block_copy(VALUE obj, const struct rb_block *dst, const struct rb_block *src);static inline
9668VALUE rb_vm_frame_block_handler(const rb_control_frame_t *cfp);
9669static inline const rb_control_frame_t *
9670RUBY_VM_END_CONTROL_FRAME(const rb_execution_context_t *ec)
9671{
9672 return (rb_control_frame_t *)(ec->vm_stack + ec->vm_stack_size);
9673}
9674static inline int
9675RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
9676{
9677 return !((void *)(RUBY_VM_END_CONTROL_FRAME(ec)) > (void *)(cfp));
9678}
9679static inline int
9680VM_BH_ISEQ_BLOCK_P(VALUE block_handler)
9681{
9682 if ((block_handler & 0x03) == 0x01) {
9683 return 1;
9684 }
9685 else {
9686 return 0;
9687 }
9688}
9689static inline VALUE
9690VM_BH_FROM_ISEQ_BLOCK(const struct rb_captured_block *captured)
9691{
9692 VALUE block_handler = ((VALUE)(captured) | (0x01));
9693 ((void)0);
9694 return block_handler;
9695}
9696static inline const struct rb_captured_block *
9697VM_BH_TO_ISEQ_BLOCK(VALUE block_handler)
9698{
9699 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
9700 ((void)0);
9701 return captured;
9702}
9703static inline int
9704VM_BH_IFUNC_P(VALUE block_handler)
9705{
9706 if ((block_handler & 0x03) == 0x03) {
9707 return 1;
9708 }
9709 else {
9710 return 0;
9711 }
9712}
9713static inline VALUE
9714VM_BH_FROM_IFUNC_BLOCK(const struct rb_captured_block *captured)
9715{
9716 VALUE block_handler = ((VALUE)(captured) | (0x03));
9717 ((void)0);
9718 return block_handler;
9719}
9720static inline const struct rb_captured_block *
9721VM_BH_TO_IFUNC_BLOCK(VALUE block_handler)
9722{
9723 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
9724 ((void)0);
9725 return captured;
9726}
9727static inline const struct rb_captured_block *
9728VM_BH_TO_CAPT_BLOCK(VALUE block_handler)
9729{
9730 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
9731 ((void)0);
9732 return captured;
9733}
9734static inline enum rb_block_handler_type
9735vm_block_handler_type(VALUE block_handler)
9736{
9737 if (VM_BH_ISEQ_BLOCK_P(block_handler)) {
9738 return block_handler_type_iseq;
9739 }
9740 else if (VM_BH_IFUNC_P(block_handler)) {
9741 return block_handler_type_ifunc;
9742 }
9743 else if (RB_SYMBOL_P(block_handler)) {
9744 return block_handler_type_symbol;
9745 }
9746 else {
9747 ((void)0);
9748 return block_handler_type_proc;
9749 }
9750}
9751static inline void
9752vm_block_handler_verify(__attribute__ ((__unused__)) VALUE block_handler)
9753{
9754 ((void)0);
9755}
9756static inline int
9757vm_cfp_forwarded_bh_p(const rb_control_frame_t *cfp, VALUE block_handler)
9758{
9759 return ((VALUE) cfp->block_code) == block_handler;
9760}
9761static inline enum rb_block_type
9762vm_block_type(const struct rb_block *block)
9763{
9764 return block->type;
9765}
9766static inline void
9767vm_block_type_set(const struct rb_block *block, enum rb_block_type type)
9768{
9769 struct rb_block *mb = (struct rb_block *)block;
9770 mb->type = type;
9771}
9772static inline const struct rb_block *
9773vm_proc_block(VALUE procval)
9774{
9775 ((void)0);
9776 return &((rb_proc_t *)(((struct RTypedData *)(procval))->data))->block;
9777}
9778static inline const rb_iseq_t *vm_block_iseq(const struct rb_block *block);
9779static inline const VALUE *vm_block_ep(const struct rb_block *block);
9780static inline const rb_iseq_t *
9781vm_proc_iseq(VALUE procval)
9782{
9783 return vm_block_iseq(vm_proc_block(procval));
9784}
9785static inline const VALUE *
9786vm_proc_ep(VALUE procval)
9787{
9788 return vm_block_ep(vm_proc_block(procval));
9789}
9790static inline const rb_iseq_t *
9791vm_block_iseq(const struct rb_block *block)
9792{
9793 switch (vm_block_type(block)) {
9794 case block_type_iseq: return rb_iseq_check(block->as.captured.code.iseq);
9795 case block_type_proc: return vm_proc_iseq(block->as.proc);
9796 case block_type_ifunc:
9797 case block_type_symbol: return ((void *)0);
9798 }
9799 __builtin_unreachable();
9800 return ((void *)0);
9801}
9802static inline const VALUE *
9803vm_block_ep(const struct rb_block *block)
9804{
9805 switch (vm_block_type(block)) {
9806 case block_type_iseq:
9807 case block_type_ifunc: return block->as.captured.ep;
9808 case block_type_proc: return vm_proc_ep(block->as.proc);
9809 case block_type_symbol: return ((void *)0);
9810 }
9811 __builtin_unreachable();
9812 return ((void *)0);
9813}
9814static inline VALUE
9815vm_block_self(const struct rb_block *block)
9816{
9817 switch (vm_block_type(block)) {
9818 case block_type_iseq:
9819 case block_type_ifunc:
9820 return block->as.captured.self;
9821 case block_type_proc:
9822 return vm_block_self(vm_proc_block(block->as.proc));
9823 case block_type_symbol:
9824 return ((VALUE)RUBY_Qundef);
9825 }
9826 __builtin_unreachable();
9827 return ((VALUE)RUBY_Qundef);
9828}
9829static inline VALUE
9830VM_BH_TO_SYMBOL(VALUE block_handler)
9831{
9832 ((void)0);
9833 return block_handler;
9834}
9835static inline VALUE
9836VM_BH_FROM_SYMBOL(VALUE symbol)
9837{
9838 ((void)0);
9839 return symbol;
9840}
9841static inline VALUE
9842VM_BH_TO_PROC(VALUE block_handler)
9843{
9844 ((void)0);
9845 return block_handler;
9846}
9847static inline VALUE
9848VM_BH_FROM_PROC(VALUE procval)
9849{
9850 ((void)0);
9851 return procval;
9852}
9853VALUE rb_thread_alloc(VALUE klass);
9854VALUE rb_binding_alloc(VALUE klass);
9855VALUE rb_proc_alloc(VALUE klass);
9856VALUE rb_proc_dup(VALUE self);
9857extern void rb_vmdebug_stack_dump_raw(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
9858extern void rb_vmdebug_debug_print_pre(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE *_pc);
9859extern void rb_vmdebug_debug_print_post(const rb_execution_context_t *ec, const rb_control_frame_t *cfp
9860);
9861void rb_vm_bugreport(const void *);
9862typedef void (*ruby_sighandler_t)(int);
9863__attribute__((__noreturn__)) void rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int sig, const void *, const char *fmt, ...);
9864
9865
9866VALUE rb_iseq_eval(const rb_iseq_t *iseq);
9867VALUE rb_iseq_eval_main(const rb_iseq_t *iseq);
9868VALUE rb_iseq_path(const rb_iseq_t *iseq);
9869VALUE rb_iseq_realpath(const rb_iseq_t *iseq);
9870
9871
9872VALUE rb_iseq_pathobj_new(VALUE path, VALUE realpath);
9873void rb_iseq_pathobj_set(const rb_iseq_t *iseq, VALUE path, VALUE realpath);
9874int rb_ec_frame_method_id_and_class(const rb_execution_context_t *ec, ID *idp, ID *called_idp, VALUE *klassp);
9875void rb_ec_setup_exception(const rb_execution_context_t *ec, VALUE mesg, VALUE cause);
9876VALUE rb_vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, int argc, const VALUE *argv, int kw_splat, VALUE block_handler);
9877VALUE rb_vm_make_proc_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass, int8_t is_lambda);
9878static inline VALUE
9879rb_vm_make_proc(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass)
9880{
9881 return rb_vm_make_proc_lambda(ec, captured, klass, 0);
9882}
9883static inline VALUE
9884rb_vm_make_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass)
9885{
9886 return rb_vm_make_proc_lambda(ec, captured, klass, 1);
9887}
9888VALUE rb_vm_make_binding(const rb_execution_context_t *ec, const rb_control_frame_t *src_cfp);
9889VALUE rb_vm_env_local_variables(const rb_env_t *env);
9890const rb_env_t *rb_vm_env_prev_env(const rb_env_t *env);
9891const VALUE *rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const ID *dynvars);
9892void rb_vm_inc_const_missing_count(void);
9893VALUE rb_vm_call_kw(rb_execution_context_t *ec, VALUE recv, VALUE id, int argc,
9894 const VALUE *argv, const rb_callable_method_entry_t *me, int kw_splat);
9895static void rb_vm_pop_frame(rb_execution_context_t *ec);
9896void rb_gvl_destroy(rb_global_vm_lock_t *gvl);
9897void rb_thread_start_timer_thread(void);
9898void rb_thread_stop_timer_thread(void);
9899void rb_thread_reset_timer_thread(void);
9900void rb_thread_wakeup_timer_thread(int);
9901static inline void
9902rb_vm_living_threads_init(rb_vm_t *vm)
9903{
9904 list_head_init(&vm->waiting_fds);
9905 list_head_init(&vm->waiting_pids);
9906 list_head_init(&vm->workqueue);
9907 list_head_init(&vm->waiting_grps);
9908 list_head_init(&vm->ractor.set);
9909}
9910typedef int rb_backtrace_iter_func(void *, VALUE, int, VALUE);
9911rb_control_frame_t *rb_vm_get_ruby_level_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
9912rb_control_frame_t *rb_vm_get_binding_creatable_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
9913int rb_vm_get_sourceline(const rb_control_frame_t *);
9914void rb_vm_stack_to_heap(rb_execution_context_t *ec);
9915void ruby_thread_init_stack(rb_thread_t *th);
9916int rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp);
9917void rb_vm_rewind_cfp(rb_execution_context_t *ec, rb_control_frame_t *cfp);
9918static VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler);
9919void rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE exception_class, VALUE mesg);
9920void rb_gc_mark_machine_stack(const rb_execution_context_t *ec);static inline
9921void rb_vm_rewrite_cref(rb_cref_t *node, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr);
9922static const rb_callable_method_entry_t *rb_vm_frame_method_entry(const rb_control_frame_t *cfp);
9923VALUE rb_catch_protect(VALUE t, rb_block_call_func *func, VALUE data, enum ruby_tag_type *stateptr);
9924rb_execution_context_t *rb_vm_main_ractor_ec(rb_vm_t *vm);
9925
9926
9927extern struct rb_ractor_struct *ruby_single_main_ractor;
9928extern rb_vm_t *ruby_current_vm_ptr;
9929extern rb_event_flag_t ruby_vm_event_flags;
9930extern rb_event_flag_t ruby_vm_event_enabled_global_flags;
9931extern unsigned int ruby_vm_event_local_num;
9932
9933
9934static inline rb_thread_t *
9935rb_ec_thread_ptr(const rb_execution_context_t *ec)
9936{
9937 return ec->thread_ptr;
9938}
9939static inline rb_ractor_t *
9940rb_ec_ractor_ptr(const rb_execution_context_t *ec)
9941{
9942 const rb_thread_t *th = rb_ec_thread_ptr(ec);
9943 if (th) {
9944 ((void)0);
9945 return th->ractor;
9946 }
9947 else {
9948 return ((void *)0);
9949 }
9950}
9951static inline rb_vm_t *
9952rb_ec_vm_ptr(const rb_execution_context_t *ec)
9953{
9954 const rb_thread_t *th = rb_ec_thread_ptr(ec);
9955 if (th) {
9956 return th->vm;
9957 }
9958 else {
9959 return ((void *)0);
9960 }
9961}
9962static inline rb_execution_context_t *
9963rb_current_execution_context(_Bool expect_ec)
9964{
9965 rb_execution_context_t *ec = ruby_current_ec;
9966 ((void)0);
9967 return ec;
9968}
9969static inline rb_thread_t *
9970rb_current_thread(void)
9971{
9972 const rb_execution_context_t *ec = rb_current_execution_context(1);
9973 return rb_ec_thread_ptr(ec);
9974}
9975static inline rb_ractor_t *
9976rb_current_ractor(void)
9977{
9978 if (ruby_single_main_ractor) {
9979 return ruby_single_main_ractor;
9980 }
9981 else {
9982 const rb_execution_context_t *ec = rb_current_execution_context(1);
9983 return rb_ec_ractor_ptr(ec);
9984 }
9985}
9986static inline rb_vm_t *
9987rb_current_vm(void)
9988{
9989 return ruby_current_vm_ptr;
9990}
9991void rb_ec_vm_lock_rec_release(const rb_execution_context_t *ec,
9992 unsigned int recorded_lock_rec,
9993 unsigned int current_lock_rec);
9994static inline unsigned int
9995rb_ec_vm_lock_rec(const rb_execution_context_t *ec)
9996{
9997 rb_vm_t *vm = rb_ec_vm_ptr(ec);
9998 if (vm->ractor.sync.lock_owner != rb_ec_ractor_ptr(ec)) {
9999 return 0;
10000 }
10001 else {
10002 return vm->ractor.sync.lock_rec;
10003 }
10004}
10005enum {
10006 TIMER_INTERRUPT_MASK = 0x01,
10007 PENDING_INTERRUPT_MASK = 0x02,
10008 POSTPONED_JOB_INTERRUPT_MASK = 0x04,
10009 TRAP_INTERRUPT_MASK = 0x08,
10010 TERMINATE_INTERRUPT_MASK = 0x10,
10011 VM_BARRIER_INTERRUPT_MASK = 0x20,
10012};
10013static inline _Bool
10014RUBY_VM_INTERRUPTED_ANY(rb_execution_context_t *ec)
10015{
10016 return ec->interrupt_flag & ~(ec)->interrupt_mask;
10017}
10018VALUE rb_exc_set_backtrace(VALUE exc, VALUE bt);
10019int rb_signal_buff_size(void);
10020int rb_signal_exec(rb_thread_t *th, int sig);
10021void rb_threadptr_check_signal(rb_thread_t *mth);
10022void rb_threadptr_signal_raise(rb_thread_t *th, int sig);
10023void rb_threadptr_signal_exit(rb_thread_t *th);
10024int rb_threadptr_execute_interrupts(rb_thread_t *, int);
10025void rb_threadptr_interrupt(rb_thread_t *th);
10026void rb_threadptr_unlock_all_locking_mutexes(rb_thread_t *th);
10027void rb_threadptr_pending_interrupt_clear(rb_thread_t *th);
10028void rb_threadptr_pending_interrupt_enque(rb_thread_t *th, VALUE v);
10029VALUE rb_ec_get_errinfo(const rb_execution_context_t *ec);
10030void rb_ec_error_print(rb_execution_context_t * volatile ec, volatile VALUE errinfo);
10031void rb_execution_context_update(const rb_execution_context_t *ec);
10032void rb_execution_context_mark(const rb_execution_context_t *ec);
10033void rb_fiber_close(rb_fiber_t *fib);
10034void Init_native_thread(rb_thread_t *th);
10035int rb_vm_check_ints_blocking(rb_execution_context_t *ec);
10036void rb_vm_cond_wait(rb_vm_t *vm, rb_nativethread_cond_t *cond);
10037void rb_vm_cond_timedwait(rb_vm_t *vm, rb_nativethread_cond_t *cond, unsigned long msec);
10038static inline void
10039rb_vm_check_ints(rb_execution_context_t *ec)
10040{
10041 ((void)0);
10042 if ((__builtin_expect(!!(RUBY_VM_INTERRUPTED_ANY(ec)), 0))) {
10043 rb_threadptr_execute_interrupts(rb_ec_thread_ptr(ec), 0);
10044 }
10045}
10046struct rb_trace_arg_struct {
10047 rb_event_flag_t event;
10049 const rb_control_frame_t *cfp;
10050 VALUE self;
10051 ID id;
10052 ID called_id;
10053 VALUE klass;
10054 VALUE data;
10055 int klass_solved;
10056 int lineno;
10057 VALUE path;
10058};
10059void rb_hook_list_mark(rb_hook_list_t *hooks);
10060void rb_hook_list_free(rb_hook_list_t *hooks);
10061void rb_hook_list_connect_tracepoint(VALUE target, rb_hook_list_t *list, VALUE tpval, unsigned int target_line);
10062void rb_hook_list_remove_tracepoint(rb_hook_list_t *list, VALUE tpval);
10063void rb_exec_event_hooks(struct rb_trace_arg_struct *trace_arg, rb_hook_list_t *hooks, int pop_p);
10064static inline void
10065rb_exec_event_hook_orig(rb_execution_context_t *ec, rb_hook_list_t *hooks, rb_event_flag_t flag,
10066 VALUE self, ID id, ID called_id, VALUE klass, VALUE data, int pop_p)
10067{
10068 struct rb_trace_arg_struct trace_arg;
10069 ((void)0);
10070 trace_arg.event = flag;
10071 trace_arg.ec = ec;
10072 trace_arg.cfp = ec->cfp;
10073 trace_arg.self = self;
10074 trace_arg.id = id;
10075 trace_arg.called_id = called_id;
10076 trace_arg.klass = klass;
10077 trace_arg.data = data;
10078 trace_arg.path = ((VALUE)RUBY_Qundef);
10079 trace_arg.klass_solved = 0;
10080 rb_exec_event_hooks(&trace_arg, hooks, pop_p);
10081}
10083 VALUE self;
10084 uint32_t id;
10085 rb_hook_list_t hooks;
10086};
10087static inline rb_hook_list_t *
10088rb_ec_ractor_hooks(const rb_execution_context_t *ec)
10089{
10090 struct rb_ractor_pub *cr_pub = (struct rb_ractor_pub *)rb_ec_ractor_ptr(ec);
10091 return &cr_pub->hooks;
10092}
10093static inline void
10094rb_exec_event_hook_script_compiled(rb_execution_context_t *ec, const rb_iseq_t *iseq, VALUE eval_script)
10095{
10096 do { const rb_event_flag_t flag_arg_ = (0x2000); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, ec->cfp->self, 0, 0, 0, RB_NIL_P(eval_script) ? (VALUE)iseq : __extension__ ({ const VALUE args_to_new_ary[] = {eval_script, (VALUE)iseq}; if (__builtin_constant_p(2)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (2), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (2)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); }), 0); } } while (0);
10097}
10098void rb_vm_trap_exit(rb_vm_t *vm);
10099
10100
10101int rb_thread_check_trap_pending(void);
10102extern VALUE rb_get_coverages(void);
10103extern void rb_set_coverages(VALUE, int, VALUE);
10104extern void rb_clear_coverages(void);
10105extern void rb_reset_coverages(void);
10106void rb_postponed_job_flush(rb_vm_t *vm);
10107extern VALUE rb_eRactorUnsafeError;
10108extern VALUE rb_eRactorIsolationError;
10109
10110
10111static inline void
10112vm_passed_block_handler_set(rb_execution_context_t *ec, VALUE block_handler)
10113{
10114 vm_block_handler_verify(block_handler);
10115 ec->passed_block_handler = block_handler;
10116}
10117static inline void
10118pass_passed_block_handler(rb_execution_context_t *ec)
10119{
10120 VALUE block_handler = rb_vm_frame_block_handler(ec->cfp);
10121 vm_passed_block_handler_set(ec, block_handler);
10122 VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_PASSED);
10123}
10124
10125extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
10126extern char *program_invocation_name;
10127extern char *program_invocation_short_name;
10128typedef int error_t;
10129
10130static inline void
10131rb_ec_vm_lock_rec_check(const rb_execution_context_t *ec, unsigned int recorded_lock_rec)
10132{
10133 unsigned int current_lock_rec = rb_ec_vm_lock_rec(ec);
10134 if (current_lock_rec != recorded_lock_rec) {
10135 rb_ec_vm_lock_rec_release(ec, recorded_lock_rec, current_lock_rec);
10136 }
10137}
10138static inline int
10139rb_ec_tag_state(const rb_execution_context_t *ec)
10140{
10141 struct rb_vm_tag *tag = ec->tag;
10142 enum ruby_tag_type state = tag->state;
10143 tag->state = RUBY_TAG_NONE;
10144 rb_ec_vm_lock_rec_check(ec, tag->lock_rec);
10145 return state;
10146}
10147__attribute__((__noreturn__)) static inline void rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st);
10148static inline void
10149rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st)
10150{
10151 ec->tag->state = st;
10152 __builtin_longjmp(((ec->tag->buf)),(1));
10153}
10154static inline VALUE
10155CREF_CLASS(const rb_cref_t *cref)
10156{
10157 return cref->klass;
10158}
10159static inline rb_cref_t *
10160CREF_NEXT(const rb_cref_t *cref)
10161{
10162 return cref->next;
10163}
10164static inline const rb_scope_visibility_t *
10165CREF_SCOPE_VISI(const rb_cref_t *cref)
10166{
10167 return &cref->scope_visi;
10168}
10169static inline VALUE
10170CREF_REFINEMENTS(const rb_cref_t *cref)
10171{
10172 return cref->refinements;
10173}
10174static inline void
10175CREF_REFINEMENTS_SET(rb_cref_t *cref, VALUE refs)
10176{
10177 rb_obj_write((VALUE)(cref), __extension__({
10178 ;
10179 ; __typeof__((VALUE *)(&cref->refinements)) unaligned_member_access_result = ((VALUE *)(&cref->refinements));
10180 ; unaligned_member_access_result; }), (VALUE)(refs), "./eval_intern.h", 232);
10181}
10182static inline int
10183CREF_PUSHED_BY_EVAL(const rb_cref_t *cref)
10184{
10185 return cref->flags & ((VALUE)RUBY_FL_USER5);
10186}
10187static inline void
10188CREF_PUSHED_BY_EVAL_SET(rb_cref_t *cref)
10189{
10190 cref->flags |= ((VALUE)RUBY_FL_USER5);
10191}
10192static inline int
10193CREF_OMOD_SHARED(const rb_cref_t *cref)
10194{
10195 return cref->flags & ((VALUE)RUBY_FL_USER6);
10196}
10197static inline void
10198CREF_OMOD_SHARED_SET(rb_cref_t *cref)
10199{
10200 cref->flags |= ((VALUE)RUBY_FL_USER6);
10201}
10202static inline void
10203CREF_OMOD_SHARED_UNSET(rb_cref_t *cref)
10204{
10205 cref->flags &= ~((VALUE)RUBY_FL_USER6);
10206}
10207enum {
10208 RAISED_EXCEPTION = 1,
10209 RAISED_STACKOVERFLOW = 2,
10210 RAISED_NOMEMORY = 4
10211};
10212int rb_ec_set_raised(rb_execution_context_t *ec);
10213int rb_ec_reset_raised(rb_execution_context_t *ec);
10214int rb_ec_stack_check(rb_execution_context_t *ec);
10215VALUE rb_f_eval(int argc, const VALUE *argv, VALUE self);
10216VALUE rb_make_exception(int argc, const VALUE *argv);
10217__attribute__((__noreturn__)) void rb_method_name_error(VALUE, VALUE);
10218__attribute__((__noreturn__)) void rb_fiber_start(void);
10219__attribute__((__noreturn__)) void rb_print_undef(VALUE, ID, rb_method_visibility_t);
10220__attribute__((__noreturn__)) void rb_print_undef_str(VALUE, VALUE);
10221__attribute__((__noreturn__)) void rb_print_inaccessible(VALUE, ID, rb_method_visibility_t);
10222__attribute__((__noreturn__)) void rb_vm_localjump_error(const char *,VALUE, int);
10223__attribute__((__noreturn__)) void rb_vm_jump_tag_but_local_jump(int);
10224VALUE rb_vm_make_jump_tag_but_local_jump(int state, VALUE val);
10225rb_cref_t *rb_vm_cref(void);
10226rb_cref_t *rb_vm_cref_replace_with_duplicated_cref(void);
10227VALUE rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg, VALUE block_handler, VALUE filename);
10228void rb_vm_set_progname(VALUE filename);
10229VALUE rb_vm_cbase(void);
10230VALUE rb_ec_backtrace_object(const rb_execution_context_t *ec);
10231VALUE rb_ec_backtrace_str_ary(const rb_execution_context_t *ec, long lev, long n);
10232VALUE rb_ec_backtrace_location_ary(const rb_execution_context_t *ec, long lev, long n, _Bool skip_internal);
10233static inline const char *
10234rb_char_next(const char *p)
10235{
10236 if (p) {
10237 int len = mblen(p, 0x7fffffff);
10238 p += len > 0 ? len : 1;
10239 }
10240 return p;
10241}
10242const char *rb_obj_info(VALUE obj);
10243const char *rb_raw_obj_info(char *buff, const int buff_size, VALUE obj);
10244VALUE rb_gc_disable_no_rest(void);
10245struct rb_thread_struct;
10246
10247
10248size_t rb_objspace_data_type_memsize(VALUE obj);
10249void rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *data);
10250void rb_objspace_reachable_objects_from_root(void (func)(const char *category, VALUE, void *), void *data);
10251int rb_objspace_markable_object_p(VALUE obj);
10252int rb_objspace_internal_object_p(VALUE obj);
10253int rb_objspace_marked_object_p(VALUE obj);
10254int rb_objspace_garbage_object_p(VALUE obj);
10255void rb_objspace_each_objects(
10256 int (*callback)(void *start, void *end, size_t stride, void *data),
10257 void *data);
10258void rb_objspace_each_objects_without_setup(
10259 int (*callback)(void *, void *, size_t, void *),
10260 void *data);
10261
10262
10263struct rb_iseq_struct;
10264int rb_dvar_defined(ID, const struct rb_iseq_struct *);
10265int rb_local_defined(ID, const struct rb_iseq_struct *);
10266const char *rb_insns_name(int i);
10267VALUE rb_insns_name_array(void);
10268int rb_vm_insn_addr2insn(const void *);
10269
10270
10271rb_event_flag_t rb_iseq_event_flags(const struct rb_iseq_struct *iseq, size_t pos);
10272
10273
10274struct rb_thread_struct;
10275struct rb_fiber_struct;
10276VALUE rb_obj_is_fiber(VALUE);
10277void rb_fiber_reset_root_local_storage(struct rb_thread_struct *);
10278void ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(VALUE), VALUE (*rollback_func)(VALUE));
10279void rb_fiber_init_mjit_cont(struct rb_fiber_struct *fiber);
10280VALUE rb_fiberptr_self(struct rb_fiber_struct *fiber);
10281unsigned int rb_fiberptr_blocking(struct rb_fiber_struct *fiber);
10282
10283
10284typedef unsigned char OnigUChar;
10285typedef unsigned int OnigCodePoint;
10286typedef unsigned int OnigCtype;
10287typedef size_t OnigDistance;
10288typedef ptrdiff_t OnigPosition;
10289typedef unsigned int OnigCaseFoldType;
10290extern OnigCaseFoldType OnigDefaultCaseFoldFlag;
10291typedef struct {
10292 int byte_len;
10293 int code_len;
10294 OnigCodePoint code[3];
10296typedef struct {
10297 OnigCodePoint esc;
10298 OnigCodePoint anychar;
10299 OnigCodePoint anytime;
10300 OnigCodePoint zero_or_one_time;
10301 OnigCodePoint one_or_more_time;
10302 OnigCodePoint anychar_anytime;
10304typedef int (*OnigApplyAllCaseFoldFunc)(OnigCodePoint from, OnigCodePoint* to, int to_len, void* arg);
10305typedef struct OnigEncodingTypeST {
10306 int (*precise_mbc_enc_len)(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc);
10307 const char* name;
10308 int max_enc_len;
10309 int min_enc_len;
10310 int (*is_mbc_newline)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
10311 OnigCodePoint (*mbc_to_code)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
10312 int (*code_to_mbclen)(OnigCodePoint code, const struct OnigEncodingTypeST* enc);
10313 int (*code_to_mbc)(OnigCodePoint code, OnigUChar *buf, const struct OnigEncodingTypeST* enc);
10314 int (*mbc_case_fold)(OnigCaseFoldType flag, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, const struct OnigEncodingTypeST* enc);
10315 int (*apply_all_case_fold)(OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg, const struct OnigEncodingTypeST* enc);
10316 int (*get_case_fold_codes_by_str)(OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem acs[], const struct OnigEncodingTypeST* enc);
10317 int (*property_name_to_ctype)(const struct OnigEncodingTypeST* enc, const OnigUChar* p, const OnigUChar* end);
10318 int (*is_code_ctype)(OnigCodePoint code, OnigCtype ctype, const struct OnigEncodingTypeST* enc);
10319 int (*get_ctype_code_range)(OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[], const struct OnigEncodingTypeST* enc);
10320 OnigUChar* (*left_adjust_char_head)(const OnigUChar* start, const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
10321 int (*is_allowed_reverse_match)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
10322 int (*case_map)(OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc);
10323 int ruby_encoding_index;
10324 unsigned int flags;
10326typedef const OnigEncodingType* OnigEncoding;
10327extern const OnigEncodingType OnigEncodingASCII;
10328extern
10329int onigenc_ascii_only_case_map(OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc);
10330extern
10331int onigenc_mbclen_approximate(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc);
10332extern
10333OnigUChar* onigenc_step_back(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end, int n);
10334extern
10335int onigenc_init(void);
10336extern
10337int onigenc_set_default_encoding(OnigEncoding enc);
10338extern
10339OnigEncoding onigenc_get_default_encoding(void);
10340extern
10341OnigUChar* onigenc_get_right_adjust_char_head_with_prev(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end, const OnigUChar** prev);
10342extern
10343OnigUChar* onigenc_get_prev_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end);
10344extern
10345OnigUChar* onigenc_get_left_adjust_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end);
10346extern
10347OnigUChar* onigenc_get_right_adjust_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end);
10348extern
10349int onigenc_strlen(OnigEncoding enc, const OnigUChar* p, const OnigUChar* end);
10350extern
10351int onigenc_strlen_null(OnigEncoding enc, const OnigUChar* p);
10352extern
10353int onigenc_str_bytelen_null(OnigEncoding enc, const OnigUChar* p);
10354typedef unsigned int OnigOptionType;
10355typedef struct {
10356 unsigned int op;
10357 unsigned int op2;
10358 unsigned int behavior;
10359 OnigOptionType options;
10360 OnigMetaCharTableType meta_char_table;
10362extern const OnigSyntaxType OnigSyntaxASIS;
10363extern const OnigSyntaxType OnigSyntaxPosixBasic;
10364extern const OnigSyntaxType OnigSyntaxPosixExtended;
10365extern const OnigSyntaxType OnigSyntaxEmacs;
10366extern const OnigSyntaxType OnigSyntaxGrep;
10367extern const OnigSyntaxType OnigSyntaxGnuRegex;
10368extern const OnigSyntaxType OnigSyntaxJava;
10369extern const OnigSyntaxType OnigSyntaxPerl58;
10370extern const OnigSyntaxType OnigSyntaxPerl58_NG;
10371extern const OnigSyntaxType OnigSyntaxPerl;
10372extern const OnigSyntaxType OnigSyntaxRuby;
10373extern const OnigSyntaxType OnigSyntaxPython;
10374extern const OnigSyntaxType* OnigDefaultSyntax;
10375struct re_registers {
10376 int allocated;
10377 int num_regs;
10378 OnigPosition* beg;
10379 OnigPosition* end;
10380};
10381typedef struct re_registers OnigRegion;
10382typedef struct {
10383 OnigEncoding enc;
10384 OnigUChar* par;
10385 OnigUChar* par_end;
10387typedef struct {
10388 int lower;
10389 int upper;
10391typedef void (*OnigWarnFunc)(const char* s);
10392extern void onig_null_warn(const char* s);
10393typedef struct re_pattern_buffer {
10394 unsigned char* p;
10395 unsigned int used;
10396 unsigned int alloc;
10397 int num_mem;
10398 int num_repeat;
10399 int num_null_check;
10400 int num_comb_exp_check;
10401 int num_call;
10402 unsigned int capture_history;
10403 unsigned int bt_mem_start;
10404 unsigned int bt_mem_end;
10405 int stack_pop_level;
10406 int repeat_range_alloc;
10407 OnigOptionType options;
10408 OnigRepeatRange* repeat_range;
10409 OnigEncoding enc;
10410 const OnigSyntaxType* syntax;
10411 void* name_table;
10412 OnigCaseFoldType case_fold_flag;
10413 int optimize;
10414 int threshold_len;
10415 int anchor;
10416 OnigDistance anchor_dmin;
10417 OnigDistance anchor_dmax;
10418 int sub_anchor;
10419 unsigned char *exact;
10420 unsigned char *exact_end;
10421 unsigned char map[256];
10422 int *int_map;
10423 int *int_map_backward;
10424 OnigDistance dmin;
10425 OnigDistance dmax;
10426 struct re_pattern_buffer* chain;
10428typedef OnigRegexType* OnigRegex;
10429typedef OnigRegexType regex_t;
10430typedef struct {
10431 int num_of_elements;
10432 OnigEncoding pattern_enc;
10433 OnigEncoding target_enc;
10434 const OnigSyntaxType* syntax;
10435 OnigOptionType option;
10436 OnigCaseFoldType case_fold_flag;
10438extern
10439int onig_initialize(OnigEncoding encodings[], int n);
10440extern
10441int onig_init(void);
10442extern
10443int onig_error_code_to_str(OnigUChar* s, OnigPosition err_code, ...);
10444extern
10445void onig_set_warn_func(OnigWarnFunc f);
10446extern
10447void onig_set_verb_warn_func(OnigWarnFunc f);
10448extern
10449int onig_new(OnigRegex*, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, const OnigSyntaxType* syntax, OnigErrorInfo* einfo);
10450extern
10451int onig_reg_init(OnigRegex reg, OnigOptionType option, OnigCaseFoldType case_fold_flag, OnigEncoding enc, const OnigSyntaxType* syntax);
10452extern
10453int onig_new_without_alloc(OnigRegex, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, const OnigSyntaxType* syntax, OnigErrorInfo* einfo);
10454extern
10455int onig_new_deluxe(OnigRegex* reg, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo);
10456extern
10457void onig_free(OnigRegex);
10458extern
10459void onig_free_body(OnigRegex);
10460extern
10461OnigPosition onig_scan(OnigRegex reg, const OnigUChar* str, const OnigUChar* end, OnigRegion* region, OnigOptionType option, int (*scan_callback)(OnigPosition, OnigPosition, OnigRegion*, void*), void* callback_arg);
10462extern
10463OnigPosition onig_search(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegion* region, OnigOptionType option);
10464extern
10465OnigPosition onig_search_gpos(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* global_pos, const OnigUChar* start, const OnigUChar* range, OnigRegion* region, OnigOptionType option);
10466extern
10467OnigPosition onig_match(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* at, OnigRegion* region, OnigOptionType option);
10468extern
10469OnigRegion* onig_region_new(void);
10470extern
10471void onig_region_init(OnigRegion* region);
10472extern
10473void onig_region_free(OnigRegion* region, int free_self);
10474extern
10475void onig_region_copy(OnigRegion* to, const OnigRegion* from);
10476extern
10477void onig_region_clear(OnigRegion* region);
10478extern
10479int onig_region_resize(OnigRegion* region, int n);
10480extern
10481int onig_region_set(OnigRegion* region, int at, int beg, int end);
10482extern
10483int onig_name_to_group_numbers(OnigRegex reg, const OnigUChar* name, const OnigUChar* name_end, int** nums);
10484extern
10485int onig_name_to_backref_number(OnigRegex reg, const OnigUChar* name, const OnigUChar* name_end, const OnigRegion *region);
10486extern
10487int onig_foreach_name(OnigRegex reg, int (*func)(const OnigUChar*, const OnigUChar*,int,int*,OnigRegex,void*), void* arg);
10488extern
10489int onig_number_of_names(const OnigRegexType *reg);
10490extern
10491int onig_number_of_captures(const OnigRegexType *reg);
10492extern
10493int onig_number_of_capture_histories(const OnigRegexType *reg);
10494extern
10495int onig_capture_tree_traverse(OnigRegion* region, int at, int(*callback_func)(int,OnigPosition,OnigPosition,int,int,void*), void* arg);
10496extern
10497int onig_noname_group_capture_is_active(const OnigRegexType *reg);
10498extern
10499OnigEncoding onig_get_encoding(const OnigRegexType *reg);
10500extern
10501OnigOptionType onig_get_options(const OnigRegexType *reg);
10502extern
10503OnigCaseFoldType onig_get_case_fold_flag(const OnigRegexType *reg);
10504extern
10505const OnigSyntaxType* onig_get_syntax(const OnigRegexType *reg);
10506extern
10507int onig_set_default_syntax(const OnigSyntaxType* syntax);
10508extern
10509void onig_copy_syntax(OnigSyntaxType* to, const OnigSyntaxType* from);
10510extern
10511unsigned int onig_get_syntax_op(const OnigSyntaxType* syntax);
10512extern
10513unsigned int onig_get_syntax_op2(const OnigSyntaxType* syntax);
10514extern
10515unsigned int onig_get_syntax_behavior(const OnigSyntaxType* syntax);
10516extern
10517OnigOptionType onig_get_syntax_options(const OnigSyntaxType* syntax);
10518extern
10519void onig_set_syntax_op(OnigSyntaxType* syntax, unsigned int op);
10520extern
10521void onig_set_syntax_op2(OnigSyntaxType* syntax, unsigned int op2);
10522extern
10523void onig_set_syntax_behavior(OnigSyntaxType* syntax, unsigned int behavior);
10524extern
10525void onig_set_syntax_options(OnigSyntaxType* syntax, OnigOptionType options);
10526extern
10527int onig_set_meta_char(OnigSyntaxType* syntax, unsigned int what, OnigCodePoint code);
10528extern
10529void onig_copy_encoding(OnigEncodingType *to, OnigEncoding from);
10530extern
10531OnigCaseFoldType onig_get_default_case_fold_flag(void);
10532extern
10533int onig_set_default_case_fold_flag(OnigCaseFoldType case_fold_flag);
10534extern
10535unsigned int onig_get_match_stack_limit_size(void);
10536extern
10537int onig_set_match_stack_limit_size(unsigned int size);
10538extern
10539unsigned int onig_get_parse_depth_limit(void);
10540extern
10541int onig_set_parse_depth_limit(unsigned int depth);
10542extern
10543int onig_end(void);
10544extern
10545const char* onig_version(void);
10546extern
10547const char* onig_copyright(void);
10548
10549
10550
10551
10552enum ruby_encoding_consts {
10553 RUBY_ENCODING_INLINE_MAX = 127,
10554 RUBY_ENCODING_SHIFT = (RUBY_FL_USHIFT+10),
10555 RUBY_ENCODING_MASK = (RUBY_ENCODING_INLINE_MAX<<RUBY_ENCODING_SHIFT
10556 ),
10557 RUBY_ENCODING_MAXNAMELEN = 42
10558};
10559enum ruby_coderange_type {
10567};
10568static inline int
10569rb_enc_coderange_clean_p(int cr)
10570{
10571 return (cr ^ (cr >> 1)) & RUBY_ENC_CODERANGE_7BIT;
10572}
10573typedef const OnigEncodingType rb_encoding;
10574int rb_char_to_option_kcode(int c, int *option, int *kcode);
10575int rb_enc_replicate(const char *, rb_encoding *);
10576int rb_define_dummy_encoding(const char *);
10577__attribute__((__pure__)) int rb_enc_dummy_p(rb_encoding *enc);
10578__attribute__((__pure__)) int rb_enc_to_index(rb_encoding *enc);
10579int rb_enc_get_index(VALUE obj);
10580void rb_enc_set_index(VALUE obj, int encindex);
10581int rb_enc_capable(VALUE obj);
10582int rb_enc_find_index(const char *name);
10583int rb_enc_alias(const char *alias, const char *orig);
10584int rb_to_encoding_index(VALUE);
10587rb_encoding *rb_enc_get(VALUE);
10588rb_encoding *rb_enc_compatible(VALUE,VALUE);
10589rb_encoding *rb_enc_check(VALUE,VALUE);
10590VALUE rb_enc_associate_index(VALUE, int);
10591VALUE rb_enc_associate(VALUE, rb_encoding*);
10592void rb_enc_copy(VALUE dst, VALUE src);
10593VALUE rb_enc_str_new(const char*, long, rb_encoding*);
10594VALUE rb_enc_str_new_cstr(const char*, rb_encoding*);
10595VALUE rb_enc_str_new_static(const char*, long, rb_encoding*);
10596VALUE rb_enc_interned_str(const char *, long, rb_encoding *);
10597VALUE rb_enc_interned_str_cstr(const char *, rb_encoding *);
10598VALUE rb_enc_reg_new(const char*, long, rb_encoding*, int);
10599__attribute__((__format__(__printf__, (2), (3)))) VALUE rb_enc_sprintf(rb_encoding *, const char*, ...);
10600VALUE rb_enc_vsprintf(rb_encoding *, const char*, va_list);
10601long rb_enc_strlen(const char*, const char*, rb_encoding*);
10602char* rb_enc_nth(const char*, const char*, long, rb_encoding*);
10603VALUE rb_obj_encoding(VALUE);
10604VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc);
10605VALUE rb_enc_uint_chr(unsigned int code, rb_encoding *enc);
10606VALUE rb_external_str_new_with_enc(const char *ptr, long len, rb_encoding *);
10607VALUE rb_str_export_to_enc(VALUE, rb_encoding *);
10608VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to);
10609VALUE rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts);
10610__attribute__((__format__(__printf__, (3), (4)))) __attribute__((__noreturn__)) void rb_enc_raise(rb_encoding *, VALUE, const char*, ...);
10612rb_encoding *rb_enc_find(const char *name);
10613int rb_enc_mbclen(const char *p, const char *e, rb_encoding *enc);
10614int rb_enc_fast_mbclen(const char *p, const char *e, rb_encoding *enc);
10615int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc);
10616int rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc);
10617unsigned int rb_enc_codepoint_len(const char *p, const char *e, int *len, rb_encoding *enc);
10618unsigned int rb_enc_codepoint(const char *p, const char *e, rb_encoding *enc);
10619int rb_enc_codelen(int code, rb_encoding *enc);
10620int rb_enc_code_to_mbclen(int code, rb_encoding *enc);
10621static inline int
10622rb_enc_asciicompat_inline(rb_encoding *enc)
10623{
10624 return (enc)->min_enc_len==1 && !rb_enc_dummy_p(enc);
10625}
10626int rb_enc_casefold(char *to, const char *p, const char *e, rb_encoding *enc);
10627__attribute__((__const__)) int rb_enc_toupper(int c, rb_encoding *enc);
10628__attribute__((__const__)) int rb_enc_tolower(int c, rb_encoding *enc);
10629ID rb_intern3(const char*, long, rb_encoding*);
10630ID rb_interned_id_p(const char *, long, rb_encoding *);
10631int rb_enc_symname_p(const char*, rb_encoding*);
10632int rb_enc_symname2_p(const char*, long, rb_encoding*);
10633int rb_enc_str_coderange(VALUE);
10634long rb_str_coderange_scan_restartable(const char*, const char*, rb_encoding*, int*);
10635int rb_enc_str_asciionly_p(VALUE);
10637__attribute__((__pure__)) int rb_enc_unicode_p(rb_encoding *enc);
10645__attribute__((__const__)) int rb_ascii8bit_encindex(void);
10646__attribute__((__const__)) int rb_utf8_encindex(void);
10647__attribute__((__const__)) int rb_usascii_encindex(void);
10648int rb_locale_encindex(void);
10649int rb_filesystem_encindex(void);
10650VALUE rb_enc_default_external(void);
10651VALUE rb_enc_default_internal(void);
10652void rb_enc_set_default_external(VALUE encoding);
10653void rb_enc_set_default_internal(VALUE encoding);
10654VALUE rb_locale_charmap(VALUE klass);
10655long rb_memsearch(const void*,long,const void*,long,rb_encoding*);
10656char *rb_enc_path_next(const char *,const char *,rb_encoding*);
10657char *rb_enc_path_skip_prefix(const char *,const char *,rb_encoding*);
10658char *rb_enc_path_last_separator(const char *,const char *,rb_encoding*);
10659char *rb_enc_path_end(const char *,const char *,rb_encoding*);
10660const char *ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encoding *enc);
10661const char *ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc);
10662ID rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc);
10663VALUE rb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc);
10664extern VALUE rb_cEncoding;
10665typedef enum {
10674typedef struct rb_econv_t rb_econv_t;
10675VALUE rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts);
10676int rb_econv_has_convpath_p(const char* from_encoding, const char* to_encoding);
10677int rb_econv_prepare_options(VALUE opthash, VALUE *ecopts, int ecflags);
10678int rb_econv_prepare_opts(VALUE opthash, VALUE *ecopts);
10679rb_econv_t *rb_econv_open(const char *source_encoding, const char *destination_encoding, int ecflags);
10680rb_econv_t *rb_econv_open_opts(const char *source_encoding, const char *destination_encoding, int ecflags, VALUE ecopts);
10681rb_econv_result_t rb_econv_convert(rb_econv_t *ec,
10682 const unsigned char **source_buffer_ptr, const unsigned char *source_buffer_end,
10683 unsigned char **destination_buffer_ptr, unsigned char *destination_buffer_end,
10684 int flags);
10685void rb_econv_close(rb_econv_t *ec);
10686int rb_econv_set_replacement(rb_econv_t *ec, const unsigned char *str, size_t len, const char *encname);
10687int rb_econv_decorate_at_first(rb_econv_t *ec, const char *decorator_name);
10688int rb_econv_decorate_at_last(rb_econv_t *ec, const char *decorator_name);
10689VALUE rb_econv_open_exc(const char *senc, const char *denc, int ecflags);
10691 const unsigned char *str, size_t len, const char *str_encoding);
10696void rb_econv_putback(rb_econv_t *ec, unsigned char *p, int n);
10697const char *rb_econv_asciicompat_encoding(const char *encname);
10698VALUE rb_econv_str_convert(rb_econv_t *ec, VALUE src, int flags);
10699VALUE rb_econv_substr_convert(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, int flags);
10700VALUE rb_econv_str_append(rb_econv_t *ec, VALUE src, VALUE dst, int flags);
10701VALUE rb_econv_substr_append(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, VALUE dst, int flags);
10702VALUE rb_econv_append(rb_econv_t *ec, const char *bytesrc, long bytesize, VALUE dst, int flags);
10704enum ruby_econv_flag_type {
10705 RUBY_ECONV_ERROR_HANDLER_MASK = 0x000000ff,
10706 RUBY_ECONV_INVALID_MASK = 0x0000000f,
10707 RUBY_ECONV_INVALID_REPLACE = 0x00000002,
10708 RUBY_ECONV_UNDEF_MASK = 0x000000f0,
10709 RUBY_ECONV_UNDEF_REPLACE = 0x00000020,
10710 RUBY_ECONV_UNDEF_HEX_CHARREF = 0x00000030,
10711 RUBY_ECONV_DECORATOR_MASK = 0x0000ff00,
10718 RUBY_ECONV_XML_TEXT_DECORATOR = 0x00004000,
10723 0,
10724 RUBY_ECONV_PARTIAL_INPUT = 0x00010000,
10725 RUBY_ECONV_AFTER_OUTPUT = 0x00020000,
10727
10728
10729VALUE rb_fstring(VALUE);
10730VALUE rb_fstring_cstr(const char *str);
10731VALUE rb_fstring_enc_new(const char *ptr, long len, rb_encoding *enc);
10732int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
10733int rb_str_symname_p(VALUE);
10734VALUE rb_str_quote_unprintable(VALUE);
10735char *rb_str_fill_terminator(VALUE str, const int termlen);
10736void rb_str_change_terminator_length(VALUE str, const int oldtermlen, const int termlen);
10737VALUE rb_str_locktmp_ensure(VALUE str, VALUE (*func)(VALUE), VALUE arg);
10738VALUE rb_str_chomp_string(VALUE str, VALUE chomp);
10739VALUE rb_external_str_with_enc(VALUE str, rb_encoding *eenc);
10740VALUE rb_str_cat_conv_enc_opts(VALUE newstr, long ofs, const char *ptr, long len,
10741 rb_encoding *from, int ecflags, VALUE ecopts);
10742VALUE rb_enc_str_scrub(rb_encoding *enc, VALUE str, VALUE repl);
10743VALUE rb_str_initialize(VALUE str, const char *ptr, long len, rb_encoding *enc);
10744size_t rb_str_memsize(VALUE);
10745char *rb_str_to_cstr(VALUE str);
10746const char *ruby_escaped_char(int c);
10747void rb_str_make_independent(VALUE str);
10748int rb_enc_str_coderange_scan(VALUE str, rb_encoding *enc);
10749static inline _Bool STR_EMBED_P(VALUE str);
10750static inline _Bool STR_SHARED_P(VALUE str);
10751static inline VALUE QUOTE(VALUE v);
10752static inline VALUE QUOTE_ID(ID v);
10753static inline _Bool is_ascii_string(VALUE str);
10754static inline _Bool is_broken_string(VALUE str);
10755static inline VALUE rb_str_eql_internal(const VALUE str1, const VALUE str2);
10756
10757
10758VALUE rb_str_tmp_frozen_acquire(VALUE str);
10759void rb_str_tmp_frozen_release(VALUE str, VALUE tmp);
10760VALUE rb_setup_fake_str(struct RString *fake_str, const char *name, long len, rb_encoding *enc);
10761VALUE rb_str_upto_each(VALUE, VALUE, int, int (*each)(VALUE, VALUE), VALUE);
10762VALUE rb_str_upto_endless_each(VALUE, int (*each)(VALUE, VALUE), VALUE);
10763
10764
10765
10766
10767VALUE rb_fstring_new(const char *ptr, long len);
10768VALUE rb_obj_as_string_result(VALUE str, VALUE obj);
10769VALUE rb_str_opt_plus(VALUE x, VALUE y);
10770VALUE rb_str_concat_literals(size_t num, const VALUE *strary);
10771VALUE rb_str_eql(VALUE str1, VALUE str2);
10772VALUE rb_id_quote_unprintable(ID);
10773VALUE rb_sym_proc_call(ID mid, int argc, const VALUE *argv, int kw_splat, VALUE passed_proc);
10775VALUE rb_ec_str_resurrect(struct rb_execution_context_struct *ec, VALUE str);
10776
10777
10778static inline VALUE
10779QUOTE(VALUE v)
10780{
10781 return rb_str_quote_unprintable(v);
10782}
10783static inline VALUE
10784QUOTE_ID(ID i)
10785{
10786 return rb_id_quote_unprintable(i);
10787}
10788static inline _Bool
10789STR_EMBED_P(VALUE str)
10790{
10791 return ! RB_FL_TEST_RAW(str, ((VALUE)RUBY_FL_USER1));
10792}
10793static inline _Bool
10794STR_SHARED_P(VALUE str)
10795{
10796 return RB_FL_ALL_RAW(str, ((VALUE)RUBY_FL_USER1) | RUBY_ELTS_SHARED);
10797}
10798static inline _Bool
10799is_ascii_string(VALUE str)
10800{
10802}
10803static inline _Bool
10804is_broken_string(VALUE str)
10805{
10807}
10808static inline VALUE
10809rb_str_eql_internal(const VALUE str1, const VALUE str2)
10810{
10811 const long len = RSTRING_LEN(str1);
10812 const char *ptr1, *ptr2;
10813 if (len != RSTRING_LEN(str2)) return ((VALUE)RUBY_Qfalse);
10814 if (!rb_str_comparable(str1, str2)) return ((VALUE)RUBY_Qfalse);
10815 if ((ptr1 = RSTRING_PTR(str1)) == (ptr2 = RSTRING_PTR(str2)))
10816 return ((VALUE)RUBY_Qtrue);
10817 if (memcmp(ptr1, ptr2, len) == 0)
10818 return ((VALUE)RUBY_Qtrue);
10819 return ((VALUE)RUBY_Qfalse);
10820}
10821extern long rb_backtrace_length_limit;
10822extern VALUE rb_eEAGAIN;
10823extern VALUE rb_eEWOULDBLOCK;
10824extern VALUE rb_eEINPROGRESS;
10825void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args);
10826__attribute__((__noreturn__)) void rb_async_bug_errno(const char *,int);
10827const char *rb_builtin_type_name(int t);
10828const char *rb_builtin_class_name(VALUE x);
10829__attribute__((__format__(__printf__, (1), (3)))) void rb_warn_deprecated(const char *fmt, const char *suggest, ...);
10830__attribute__((__format__(__printf__, (1), (3)))) void rb_warn_deprecated_to_remove(const char *fmt, const char *removal, ...);
10831VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list);
10832__attribute__((__format__(__printf__, (2), (3)))) void rb_enc_warn(rb_encoding *enc, const char *fmt, ...);
10833__attribute__((__format__(__printf__, (2), (3)))) void rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...);
10834__attribute__((__format__(__printf__, (3), (4)))) void rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt, ...);
10835rb_warning_category_t rb_warning_category_from_name(VALUE category);
10836_Bool rb_warning_category_enabled_p(rb_warning_category_t category);
10837VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method);
10838VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int priv);
10839VALUE rb_key_err_new(VALUE mesg, VALUE recv, VALUE name);
10840__attribute__((__format__(__printf__, (1), (2)))) VALUE rb_warning_string(const char *fmt, ...);
10841__attribute__((__noreturn__)) void rb_vraise(VALUE, const char *, va_list);
10842__attribute__((__noreturn__)) static inline void rb_raise_cstr(VALUE etype, const char *mesg);
10843__attribute__((__noreturn__)) static inline void rb_raise_cstr_i(VALUE etype, VALUE mesg);
10844__attribute__((__noreturn__)) static inline void rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name);
10845__attribute__((__noreturn__)) static inline void rb_name_err_raise(const char *mesg, VALUE recv, VALUE name);
10846__attribute__((__noreturn__)) static inline void rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name);
10847static inline void Check_Type(VALUE v, enum ruby_value_type t);
10848static inline _Bool rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type);
10849
10850
10851int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
10852__attribute__((__noreturn__)) void rb_sys_fail_path_in(const char *func_name, VALUE path);
10853__attribute__((__noreturn__)) void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path);
10854VALUE rb_syserr_new_path_in(const char *func_name, int n, VALUE path);
10855
10856
10857static inline void
10858rb_raise_cstr_i(VALUE etype, VALUE mesg)
10859{
10860 VALUE exc = rb_exc_new_str(etype, mesg);
10861 rb_exc_raise(exc);
10862}
10863static inline void
10864rb_raise_cstr(VALUE etype, const char *mesg)
10865{
10866 VALUE str = ((__builtin_constant_p(mesg) ? rbimpl_str_new_cstr : rb_str_new_cstr) (mesg));
10867 rb_raise_cstr_i(etype, str);
10868}
10869static inline void
10870rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name)
10871{
10872 VALUE exc = rb_name_err_new(mesg, recv, name);
10873 rb_exc_raise(exc);
10874}
10875static inline void
10876rb_name_err_raise(const char *mesg, VALUE recv, VALUE name)
10877{
10878 VALUE str = (__builtin_constant_p(mesg) ? rb_fstring_new((mesg), (long)strlen(mesg)) : (rb_fstring_cstr)(mesg));
10879 rb_name_err_raise_str(str, recv, name);
10880}
10881static inline void
10882rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name)
10883{
10884 VALUE exc = rb_key_err_new(mesg, recv, name);
10885 rb_exc_raise(exc);
10886}
10887static inline _Bool
10888rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type)
10889{
10890 return RB_TYPE_P(obj, RUBY_T_DATA) && RTYPEDDATA_P(obj) && (RTYPEDDATA_TYPE(obj) == data_type);
10891}
10892extern ID ruby_static_id_signo;
10893extern ID ruby_static_id_status;
10894VALUE rb_refinement_module_get_refined_class(VALUE module);
10895void rb_class_modify_check(VALUE);
10896__attribute__((__noreturn__)) VALUE rb_f_raise(int argc, VALUE *argv);
10897VALUE rb_get_backtrace(VALUE info);
10898void rb_call_end_proc(VALUE data);
10899void rb_mark_end_proc(void);
10900void Init_class_hierarchy(void);
10901void Init_enc(void);
10902void Init_ext(void);
10903void Init_File(void);
10904void Init_heap(void);
10905int Init_enc_set_filesystem_encoding(void);
10906void Init_newline(void);
10907void Init_BareVM(void);
10908void Init_vm_objects(void);
10909void Init_vm_backtrace(void);
10910void Init_vm_eval(void);static inline
10911void Init_vm_stack_canary(void);
10912void Init_eval_method(void);
10913void rb_call_inits(void);
10914struct rb_id_table;
10915enum rb_id_table_iterator_result {
10916 ID_TABLE_CONTINUE = ST_CONTINUE,
10917 ID_TABLE_STOP = ST_STOP,
10918 ID_TABLE_DELETE = ST_DELETE,
10919 ID_TABLE_REPLACE = ST_REPLACE,
10920 ID_TABLE_ITERATOR_RESULT_END
10921};
10922struct rb_id_table *rb_id_table_create(size_t size);
10923void rb_id_table_free(struct rb_id_table *tbl);
10924void rb_id_table_clear(struct rb_id_table *tbl);
10925size_t rb_id_table_size(const struct rb_id_table *tbl);
10926size_t rb_id_table_memsize(const struct rb_id_table *tbl);
10927int rb_id_table_insert(struct rb_id_table *tbl, ID id, VALUE val);
10928int rb_id_table_lookup(struct rb_id_table *tbl, ID id, VALUE *valp);
10929int rb_id_table_delete(struct rb_id_table *tbl, ID id);
10930typedef enum rb_id_table_iterator_result rb_id_table_update_callback_func_t(ID *id, VALUE *val, void *data, int existing);
10931typedef enum rb_id_table_iterator_result rb_id_table_foreach_func_t(ID id, VALUE val, void *data);
10932typedef enum rb_id_table_iterator_result rb_id_table_foreach_values_func_t(VALUE val, void *data);
10933void rb_id_table_foreach(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, void *data);
10934void rb_id_table_foreach_with_replace(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, rb_id_table_update_callback_func_t *replace, void *data);
10935void rb_id_table_foreach_values(struct rb_id_table *tbl, rb_id_table_foreach_values_func_t *func, void *data);
10936struct rb_subclass_entry {
10937 VALUE klass;
10938 struct rb_subclass_entry *next;
10939};
10941 uint32_t index;
10942 rb_serial_t class_serial;
10943 VALUE class_value;
10944};
10945struct rb_classext_struct {
10946 struct st_table *iv_index_tbl;
10947 struct st_table *iv_tbl;
10948 struct rb_id_table *m_tbl;
10949 struct rb_id_table *const_tbl;
10950 struct rb_id_table *callable_m_tbl;
10951 struct rb_id_table *cc_tbl;
10952 struct rb_subclass_entry *subclasses;
10953 struct rb_subclass_entry **parent_subclasses;
10954 struct rb_subclass_entry **module_subclasses;
10955 const VALUE origin_;
10956 const VALUE refined_class;
10957 rb_alloc_func_t allocator;
10958 const VALUE includer;
10959};
10960struct RClass {
10961 struct RBasic basic;
10962 VALUE super;
10963 struct rb_classext_struct *ptr;
10964 rb_serial_t class_serial;
10965};
10967typedef struct rb_classext_struct rb_classext_t;
10968void rb_class_subclass_add(VALUE super, VALUE klass);
10969void rb_class_remove_from_super_subclasses(VALUE);
10970int rb_singleton_class_internal_p(VALUE sklass);
10971VALUE rb_class_boot(VALUE);
10972VALUE rb_make_metaclass(VALUE, VALUE);
10973VALUE rb_include_class_new(VALUE, VALUE);
10974void rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE);
10975void rb_class_detach_subclasses(VALUE);
10976void rb_class_detach_module_subclasses(VALUE);
10977void rb_class_remove_from_module_subclasses(VALUE);
10978VALUE rb_obj_methods(int argc, const VALUE *argv, VALUE obj);
10979VALUE rb_obj_protected_methods(int argc, const VALUE *argv, VALUE obj);
10980VALUE rb_obj_private_methods(int argc, const VALUE *argv, VALUE obj);
10981VALUE rb_obj_public_methods(int argc, const VALUE *argv, VALUE obj);
10982VALUE rb_special_singleton_class(VALUE);
10983VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach);
10984VALUE rb_singleton_class_get(VALUE obj);
10985int rb_class_has_methods(VALUE c);
10986void rb_undef_methods_from(VALUE klass, VALUE super);
10987static inline void RCLASS_SET_ORIGIN(VALUE klass, VALUE origin);
10988static inline void RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass);
10989static inline VALUE RCLASS_SUPER(VALUE klass);
10990static inline VALUE RCLASS_SET_SUPER(VALUE klass, VALUE super);
10991static inline void RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass);
10992
10993
10994VALUE rb_class_inherited(VALUE, VALUE);
10995VALUE rb_keyword_error_new(const char *, VALUE);
10996
10997
10998static inline void
10999RCLASS_SET_ORIGIN(VALUE klass, VALUE origin)
11000{
11001 rb_obj_write((VALUE)(klass), __extension__({
11002 ;
11003 ; __typeof__((VALUE *)(&((((struct RClass *)(klass))->ptr)->origin_))) unaligned_member_access_result = ((VALUE *)(&((((struct RClass *)(klass))->ptr)->origin_)));
11004 ; unaligned_member_access_result; }), (VALUE)(origin), "./internal/class.h", 135);
11005 if (klass != origin) RB_FL_SET(origin, ((VALUE)RUBY_FL_USER5));
11006}
11007static inline void
11008RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass)
11009{
11010 RB_FL_SET(iclass, ((VALUE)RUBY_FL_USER8));
11011}
11012static inline _Bool
11013RICLASS_OWNS_M_TBL_P(VALUE iclass)
11014{
11015 return RB_FL_TEST_RAW(iclass, ((VALUE)RUBY_FL_USER5) | ((VALUE)RUBY_FL_USER8)) == ((VALUE)RUBY_FL_USER5);
11016}
11017static inline void
11018RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass)
11019{
11020 rb_obj_write((VALUE)(iclass), __extension__({
11021 ;
11022 ; __typeof__((VALUE *)(&((((struct RClass *)(iclass))->ptr)->includer))) unaligned_member_access_result = ((VALUE *)(&((((struct RClass *)(iclass))->ptr)->includer)));
11023 ; unaligned_member_access_result; }), (VALUE)(klass), "./internal/class.h", 154);
11024}
11025static inline VALUE
11026RCLASS_SUPER(VALUE klass)
11027{
11028 return ((struct RClass *)(klass))->super;
11029}
11030static inline VALUE
11031RCLASS_SET_SUPER(VALUE klass, VALUE super)
11032{
11033 if (super) {
11034 rb_class_remove_from_super_subclasses(klass);
11035 rb_class_subclass_add(super, klass);
11036 }
11037 rb_obj_write((VALUE)(klass), __extension__({
11038 ;
11039 ; __typeof__((VALUE *)(&((struct RClass *)(klass))->super)) unaligned_member_access_result = ((VALUE *)(&((struct RClass *)(klass))->super));
11040 ; unaligned_member_access_result; }), (VALUE)(super), "./internal/class.h", 170);
11041 return super;
11042}
11043VALUE rb_class_search_ancestor(VALUE klass, VALUE super);
11044__attribute__((__noreturn__)) void rb_undefined_alloc(VALUE klass);
11045double rb_num_to_dbl(VALUE val);
11046VALUE rb_obj_dig(int argc, VALUE *argv, VALUE self, VALUE notfound);
11047VALUE rb_immutable_obj_clone(int, VALUE *, VALUE);
11048VALUE rb_check_convert_type_with_id(VALUE,int,const char*,ID);
11049int rb_bool_expected(VALUE, const char *);
11050static inline void RBASIC_CLEAR_CLASS(VALUE obj);
11051static inline void RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass);
11052static inline void RBASIC_SET_CLASS(VALUE obj, VALUE klass);
11053static inline struct st_table *ROBJECT_IV_INDEX_TBL_inline(VALUE obj);
11054
11055
11056int rb_opts_exception_p(VALUE opts, int default_value);
11057
11058
11059
11060
11061__attribute__((__const__)) VALUE rb_obj_equal(VALUE obj1, VALUE obj2);
11062__attribute__((__const__)) VALUE rb_obj_not(VALUE obj);
11063VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
11064void rb_obj_copy_ivar(VALUE dest, VALUE obj);
11065VALUE rb_false(VALUE obj);
11066VALUE rb_convert_type_with_id(VALUE v, int t, const char* nam, ID mid);
11067VALUE rb_obj_size(VALUE self, VALUE args, VALUE obj);
11068
11069
11070static inline void
11071RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass)
11072{
11073 struct { VALUE flags; VALUE klass; } *ptr = (void *)obj;
11074 ptr->klass = klass;
11075}
11076static inline void
11077RBASIC_CLEAR_CLASS(VALUE obj)
11078{
11079 RBASIC_SET_CLASS_RAW(obj, 0);
11080}
11081static inline void
11082RBASIC_SET_CLASS(VALUE obj, VALUE klass)
11083{
11084 VALUE oldv = RBASIC_CLASS(obj);
11085 RBASIC_SET_CLASS_RAW(obj, klass);
11086 (rb_obj_written((VALUE)(obj), (VALUE)(oldv), (VALUE)(klass), "./internal/object.h", 65));
11087}
11088__attribute__((__pure__))
11089static inline struct st_table *
11090ROBJECT_IV_INDEX_TBL_inline(VALUE obj)
11091{
11092 if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) {
11093 VALUE klass = rb_obj_class(obj);
11094 return ((((struct RClass *)(klass))->ptr)->iv_index_tbl);
11095 }
11096 else {
11097 const struct RObject *const ptr = ((struct RObject *)(obj));
11098 return ptr->as.heap.iv_index_tbl;
11099 }
11100}
11101struct rb_iseq_struct;
11102VALUE rb_parser_set_yydebug(VALUE, VALUE);
11103void *rb_parser_load_file(VALUE parser, VALUE name);
11104
11105
11106VALUE rb_parser_set_context(VALUE, const struct rb_iseq_struct *, int);
11107
11108
11109struct rb_block;
11110struct rb_iseq_struct;
11111VALUE rb_proc_location(VALUE self);
11112st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
11113int rb_block_pair_yield_optimizable(void);
11114int rb_block_arity(void);
11115int rb_block_min_max_arity(int *max);
11116VALUE rb_block_to_s(VALUE self, const struct rb_block *block, const char *additional_info);
11117VALUE rb_callable_receiver(VALUE);
11118
11119
11120VALUE rb_func_proc_new(rb_block_call_func_t func, VALUE val);
11121VALUE rb_func_lambda_new(rb_block_call_func_t func, VALUE val, int min_argc, int max_argc);
11122VALUE rb_iseq_location(const struct rb_iseq_struct *iseq);
11123VALUE rb_sym_to_proc(VALUE sym);
11124
11125
11126VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline);
11127VALUE rb_reg_check_preprocess(VALUE);
11128long rb_reg_search0(VALUE, VALUE, long, int, int);
11129VALUE rb_reg_match_p(VALUE re, VALUE str, long pos);
11130_Bool rb_reg_start_with_p(VALUE re, VALUE str);
11131void rb_backref_set_string(VALUE string, long pos, long len);
11132void rb_match_unbusy(VALUE);
11133int rb_match_count(VALUE match);
11134int rb_match_nth_defined(int nth, VALUE match);
11135
11136
11137VALUE rb_reg_new_ary(VALUE ary, int options);
11138
11139
11140VALUE rb_to_symbol_type(VALUE obj);
11141VALUE rb_sym_intern(const char *ptr, long len, rb_encoding *enc);
11142VALUE rb_sym_intern_ascii(const char *ptr, long len);
11143VALUE rb_sym_intern_ascii_cstr(const char *ptr);
11144int rb_is_const_name(VALUE name);
11145int rb_is_class_name(VALUE name);
11146int rb_is_instance_name(VALUE name);
11147int rb_is_local_name(VALUE name);
11148__attribute__((__pure__)) int rb_is_const_sym(VALUE sym);
11149__attribute__((__pure__)) int rb_is_attrset_sym(VALUE sym);
11150ID rb_make_internal_id(void);
11151void rb_gc_free_dsymbol(VALUE);
11152typedef
11153 struct {
11154 unsigned long int nraddr;
11155 }
11156 OrigFn;
11157typedef
11158 enum { VG_USERREQ__RUNNING_ON_VALGRIND = 0x1001,
11159 VG_USERREQ__DISCARD_TRANSLATIONS = 0x1002,
11160 VG_USERREQ__CLIENT_CALL0 = 0x1101,
11161 VG_USERREQ__CLIENT_CALL1 = 0x1102,
11162 VG_USERREQ__CLIENT_CALL2 = 0x1103,
11163 VG_USERREQ__CLIENT_CALL3 = 0x1104,
11164 VG_USERREQ__COUNT_ERRORS = 0x1201,
11165 VG_USERREQ__GDB_MONITOR_COMMAND = 0x1202,
11166 VG_USERREQ__CLO_CHANGE = 0x1203,
11167 VG_USERREQ__MALLOCLIKE_BLOCK = 0x1301,
11168 VG_USERREQ__RESIZEINPLACE_BLOCK = 0x130b,
11169 VG_USERREQ__FREELIKE_BLOCK = 0x1302,
11170 VG_USERREQ__CREATE_MEMPOOL = 0x1303,
11171 VG_USERREQ__DESTROY_MEMPOOL = 0x1304,
11172 VG_USERREQ__MEMPOOL_ALLOC = 0x1305,
11173 VG_USERREQ__MEMPOOL_FREE = 0x1306,
11174 VG_USERREQ__MEMPOOL_TRIM = 0x1307,
11175 VG_USERREQ__MOVE_MEMPOOL = 0x1308,
11176 VG_USERREQ__MEMPOOL_CHANGE = 0x1309,
11177 VG_USERREQ__MEMPOOL_EXISTS = 0x130a,
11178 VG_USERREQ__PRINTF = 0x1401,
11179 VG_USERREQ__PRINTF_BACKTRACE = 0x1402,
11180 VG_USERREQ__PRINTF_VALIST_BY_REF = 0x1403,
11181 VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF = 0x1404,
11182 VG_USERREQ__STACK_REGISTER = 0x1501,
11183 VG_USERREQ__STACK_DEREGISTER = 0x1502,
11184 VG_USERREQ__STACK_CHANGE = 0x1503,
11185 VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601,
11186 VG_USERREQ__MAP_IP_TO_SRCLOC = 0x1701,
11187 VG_USERREQ__CHANGE_ERR_DISABLEMENT = 0x1801,
11188 VG_USERREQ__VEX_INIT_FOR_IRI = 0x1901,
11189 VG_USERREQ__INNER_THREADS = 0x1902
11190 } Vg_ClientRequest;
11191static int VALGRIND_PRINTF(const char *format, ...)
11192 __attribute__((format(__printf__, 1, 2), __unused__));
11193static int
11194VALGRIND_PRINTF(const char *format, ...)
11195{
11196 unsigned long _qzz_res;
11197 va_list vargs;
11198 __builtin_va_start(vargs,format);
11199 _qzz_res = __extension__ ({ volatile unsigned long int _zzq_args[6]; volatile unsigned long int _zzq_result; _zzq_args[0] = (unsigned long int)(VG_USERREQ__PRINTF_VALIST_BY_REF); _zzq_args[1] = (unsigned long int)((unsigned long)format); _zzq_args[2] = (unsigned long int)((unsigned long)&vargs); _zzq_args[3] = (unsigned long int)(0); _zzq_args[4] = (unsigned long int)(0); _zzq_args[5] = (unsigned long int)(0); __asm__ volatile("rolq $3, %%rdi ; rolq $13, %%rdi\n\t" "rolq $61, %%rdi ; rolq $51, %%rdi\n\t" "xchgq %%rbx,%%rbx" : "=d" (_zzq_result) : "a" (&_zzq_args[0]), "0" (0) : "cc", "memory" ); _zzq_result; });
11200 __builtin_va_end(vargs);
11201 return (int)_qzz_res;
11202}
11203static int VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
11204 __attribute__((format(__printf__, 1, 2), __unused__));
11205static int
11206VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
11207{
11208 unsigned long _qzz_res;
11209 va_list vargs;
11210 __builtin_va_start(vargs,format);
11211 _qzz_res = __extension__ ({ volatile unsigned long int _zzq_args[6]; volatile unsigned long int _zzq_result; _zzq_args[0] = (unsigned long int)(VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF); _zzq_args[1] = (unsigned long int)((unsigned long)format); _zzq_args[2] = (unsigned long int)((unsigned long)&vargs); _zzq_args[3] = (unsigned long int)(0); _zzq_args[4] = (unsigned long int)(0); _zzq_args[5] = (unsigned long int)(0); __asm__ volatile("rolq $3, %%rdi ; rolq $13, %%rdi\n\t" "rolq $61, %%rdi ; rolq $51, %%rdi\n\t" "xchgq %%rbx,%%rbx" : "=d" (_zzq_result) : "a" (&_zzq_args[0]), "0" (0) : "cc", "memory" ); _zzq_result; });
11212 __builtin_va_end(vargs);
11213 return (int)_qzz_res;
11214}
11215typedef
11216 enum {
11217 VG_USERREQ__MAKE_MEM_NOACCESS = ((unsigned int)((('M')&0xff) << 24 | (('C')&0xff) << 16)),
11218 VG_USERREQ__MAKE_MEM_UNDEFINED,
11219 VG_USERREQ__MAKE_MEM_DEFINED,
11220 VG_USERREQ__DISCARD,
11221 VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE,
11222 VG_USERREQ__CHECK_MEM_IS_DEFINED,
11223 VG_USERREQ__DO_LEAK_CHECK,
11224 VG_USERREQ__COUNT_LEAKS,
11225 VG_USERREQ__GET_VBITS,
11226 VG_USERREQ__SET_VBITS,
11227 VG_USERREQ__CREATE_BLOCK,
11228 VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE,
11229 VG_USERREQ__COUNT_LEAK_BLOCKS,
11230 VG_USERREQ__ENABLE_ADDR_ERROR_REPORTING_IN_RANGE,
11231 VG_USERREQ__DISABLE_ADDR_ERROR_REPORTING_IN_RANGE,
11232 _VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERROR
11233 = ((unsigned int)((('M')&0xff) << 24 | (('C')&0xff) << 16)) + 256
11234 } Vg_MemCheckClientRequest;
11235typedef struct {
11236 int coverage_sandboxed;
11237 intptr_t coverage_fd;
11238 unsigned int coverage_max_block_size;
11240void __sanitizer_set_report_path(const char *path);
11241void __sanitizer_set_report_fd(void *fd);
11242void __sanitizer_sandbox_on_notify(__sanitizer_sandbox_arguments *args);
11243void __sanitizer_report_error_summary(const char *error_summary);
11244uint16_t __sanitizer_unaligned_load16(const void *p);
11245uint32_t __sanitizer_unaligned_load32(const void *p);
11246uint64_t __sanitizer_unaligned_load64(const void *p);
11247void __sanitizer_unaligned_store16(void *p, uint16_t x);
11248void __sanitizer_unaligned_store32(void *p, uint32_t x);
11249void __sanitizer_unaligned_store64(void *p, uint64_t x);
11250int __sanitizer_acquire_crash_state();
11251void __sanitizer_annotate_contiguous_container(const void *beg,
11252 const void *end,
11253 const void *old_mid,
11254 const void *new_mid);
11255int __sanitizer_verify_contiguous_container(const void *beg, const void *mid,
11256 const void *end);
11257const void *__sanitizer_contiguous_container_find_bad_address(const void *beg,
11258 const void *mid,
11259 const void *end);
11260void __sanitizer_print_stack_trace(void);
11261void __sanitizer_symbolize_pc(void *pc, const char *fmt, char *out_buf,
11262 size_t out_buf_size);
11263void __sanitizer_symbolize_global(void *data_ptr, const char *fmt,
11264 char *out_buf, size_t out_buf_size);
11265void __sanitizer_set_death_callback(void (*callback)(void));
11266void __sanitizer_weak_hook_memcmp(void *called_pc, const void *s1,
11267 const void *s2, size_t n, int result);
11268void __sanitizer_weak_hook_strncmp(void *called_pc, const char *s1,
11269 const char *s2, size_t n, int result);
11270void __sanitizer_weak_hook_strncasecmp(void *called_pc, const char *s1,
11271 const char *s2, size_t n, int result);
11272void __sanitizer_weak_hook_strcmp(void *called_pc, const char *s1,
11273 const char *s2, int result);
11274void __sanitizer_weak_hook_strcasecmp(void *called_pc, const char *s1,
11275 const char *s2, int result);
11276void __sanitizer_weak_hook_strstr(void *called_pc, const char *s1,
11277 const char *s2, char *result);
11278void __sanitizer_weak_hook_strcasestr(void *called_pc, const char *s1,
11279 const char *s2, char *result);
11280void __sanitizer_weak_hook_memmem(void *called_pc,
11281 const void *s1, size_t len1,
11282 const void *s2, size_t len2, void *result);
11283void __sanitizer_print_memory_profile(size_t top_percent,
11284 size_t max_number_of_contexts);
11285void __sanitizer_start_switch_fiber(void **fake_stack_save,
11286 const void *bottom, size_t size);
11287void __sanitizer_finish_switch_fiber(void *fake_stack_save,
11288 const void **bottom_old,
11289 size_t *size_old);
11290int __sanitizer_get_module_and_offset_for_pc(void *pc, char *module_path,
11291 size_t module_path_len,
11292 void **pc_offset);
11293void __asan_poison_memory_region(void const volatile *addr, size_t size);
11294void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
11295int __asan_address_is_poisoned(void const volatile *addr);
11296void *__asan_region_is_poisoned(void *beg, size_t size);
11297void __asan_describe_address(void *addr);
11298int __asan_report_present(void);
11299void *__asan_get_report_pc(void);
11300void *__asan_get_report_bp(void);
11301void *__asan_get_report_sp(void);
11302void *__asan_get_report_address(void);
11303int __asan_get_report_access_type(void);
11304size_t __asan_get_report_access_size(void);
11305const char *__asan_get_report_description(void);
11306const char *__asan_locate_address(void *addr, char *name, size_t name_size,
11307 void **region_address, size_t *region_size);
11308size_t __asan_get_alloc_stack(void *addr, void **trace, size_t size,
11309 int *thread_id);
11310size_t __asan_get_free_stack(void *addr, void **trace, size_t size,
11311 int *thread_id);
11312void __asan_get_shadow_mapping(size_t *shadow_scale, size_t *shadow_offset);
11313void __asan_report_error(void *pc, void *bp, void *sp,
11314 void *addr, int is_write, size_t access_size);
11315void __asan_set_death_callback(void (*callback)(void));
11316void __asan_set_error_report_callback(void (*callback)(const char *));
11317void __asan_on_error(void);
11318void __asan_print_accumulated_stats(void);
11319const char* __asan_default_options(void);
11320void *__asan_get_current_fake_stack(void);
11321void *__asan_addr_is_in_fake_stack(void *fake_stack, void *addr, void **beg,
11322 void **end);
11323void __asan_handle_no_return(void);
11324int __asan_update_allocation_context(void* addr);
11325extern const int ruby_api_version[];
11326extern const ID rb_iseq_shared_exc_local_tbl[];
11327static inline rb_snum_t
11328ISEQ_FLIP_CNT_INCREMENT(const rb_iseq_t *iseq)
11329{
11330 rb_snum_t cnt = iseq->body->variable.flip_count;
11331 iseq->body->variable.flip_count += 1;
11332 return cnt;
11333}
11334static inline VALUE *
11335ISEQ_ORIGINAL_ISEQ(const rb_iseq_t *iseq)
11336{
11337 return iseq->body->variable.original_iseq;
11338}
11339static inline void
11340ISEQ_ORIGINAL_ISEQ_CLEAR(const rb_iseq_t *iseq)
11341{
11342 void *ptr = iseq->body->variable.original_iseq;
11343 iseq->body->variable.original_iseq = ((void *)0);
11344 if (ptr) {
11345 ruby_xfree(ptr);
11346 }
11347}
11348static inline VALUE *
11349ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size)
11350{
11351 return iseq->body->variable.original_iseq =
11352 ((VALUE *)ruby_xmalloc2((size), sizeof(VALUE)));
11353}
11354struct iseq_compile_data {
11355 const VALUE err_info;
11356 const VALUE catch_table_ary;
11357 struct iseq_label_data *start_label;
11358 struct iseq_label_data *end_label;
11359 struct iseq_label_data *redo_label;
11360 const rb_iseq_t *current_block;
11361 struct iseq_compile_data_ensure_node_stack *ensure_node_stack;
11362 struct {
11363 struct iseq_compile_data_storage *storage_head;
11364 struct iseq_compile_data_storage *storage_current;
11365 } node;
11366 struct {
11367 struct iseq_compile_data_storage *storage_head;
11368 struct iseq_compile_data_storage *storage_current;
11369 } insn;
11370 int loopval_popped;
11371 int last_line;
11372 int label_no;
11373 int node_level;
11374 int isolated_depth;
11375 unsigned int ci_index;
11376 const rb_compile_option_t *option;
11377 struct rb_id_table *ivar_cache_table;
11378 const struct rb_builtin_function *builtin_function_table;
11379};
11380static inline struct iseq_compile_data *
11381ISEQ_COMPILE_DATA(const rb_iseq_t *iseq)
11382{
11383 if (iseq->flags & ((VALUE)RUBY_FL_USER6)) {
11384 return iseq->aux.compile_data;
11385 }
11386 else {
11387 return ((void *)0);
11388 }
11389}
11390static inline void
11391ISEQ_COMPILE_DATA_ALLOC(rb_iseq_t *iseq)
11392{
11393 iseq->aux.compile_data = (((struct iseq_compile_data *)ruby_xcalloc((1), sizeof(struct iseq_compile_data))));
11394 iseq->flags |= ((VALUE)RUBY_FL_USER6);
11395}
11396static inline void
11397ISEQ_COMPILE_DATA_CLEAR(rb_iseq_t *iseq)
11398{
11399 iseq->flags &= ~((VALUE)RUBY_FL_USER6);
11400 iseq->aux.compile_data = ((void *)0);
11401}
11402static inline rb_iseq_t *
11403iseq_imemo_alloc(void)
11404{
11405 return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0);
11406}
11407VALUE rb_iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt);
11408void rb_ibf_load_iseq_complete(rb_iseq_t *iseq);
11409const rb_iseq_t *rb_iseq_ibf_load(VALUE str);
11410const rb_iseq_t *rb_iseq_ibf_load_bytes(const char *cstr, size_t);
11411VALUE rb_iseq_ibf_load_extra_data(VALUE str);
11412void rb_iseq_init_trace(rb_iseq_t *iseq);
11413int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line);
11414int rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval);
11415const rb_iseq_t *rb_iseq_load_iseq(VALUE fname);
11416unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body);
11417
11418
11419VALUE rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node);
11420VALUE rb_iseq_compile_callback(rb_iseq_t *iseq, const struct rb_iseq_new_with_callback_callback_func * ifunc);
11421VALUE *rb_iseq_original_iseq(const rb_iseq_t *iseq);
11422void rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc,
11423 VALUE locals, VALUE args,
11424 VALUE exception, VALUE body);
11425void rb_iseq_mark_insn_storage(struct iseq_compile_data_storage *arena);
11426VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
11427VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
11428unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos);
11429void rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events);
11430void rb_iseq_trace_set_all(rb_event_flag_t turnon_events);
11431void rb_iseq_insns_info_encode_positions(const rb_iseq_t *iseq);
11432struct rb_iseq_constant_body *rb_iseq_constant_body_alloc(void);
11433VALUE rb_iseqw_new(const rb_iseq_t *iseq);
11434const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw);
11435VALUE rb_iseq_absolute_path(const rb_iseq_t *iseq);
11436VALUE rb_iseq_label(const rb_iseq_t *iseq);
11437VALUE rb_iseq_base_label(const rb_iseq_t *iseq);
11438VALUE rb_iseq_first_lineno(const rb_iseq_t *iseq);
11439VALUE rb_iseq_method_name(const rb_iseq_t *iseq);
11440void rb_iseq_code_location(const rb_iseq_t *iseq, int *first_lineno, int *first_column, int *last_lineno, int *last_column);
11441void rb_iseq_remove_coverage_all(void);
11442const rb_iseq_t *rb_method_iseq(VALUE body);
11443const rb_iseq_t *rb_proc_get_iseq(VALUE proc, int *is_proc);
11445 unsigned int inline_const_cache: 1;
11446 unsigned int peephole_optimization: 1;
11447 unsigned int tailcall_optimization: 1;
11448 unsigned int specialized_instruction: 1;
11449 unsigned int operands_unification: 1;
11450 unsigned int instructions_unification: 1;
11451 unsigned int stack_caching: 1;
11452 unsigned int frozen_string_literal: 1;
11453 unsigned int debug_frozen_string_literal: 1;
11454 unsigned int coverage_enabled: 1;
11455 int debug_level;
11456};
11457struct iseq_insn_info_entry {
11458 int line_no;
11459 rb_event_flag_t events;
11460};
11462 enum catch_type {
11463 CATCH_TYPE_RESCUE = __builtin_choose_expr( __builtin_constant_p(1), ((VALUE)(1)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(1)),
11464 CATCH_TYPE_ENSURE = __builtin_choose_expr( __builtin_constant_p(2), ((VALUE)(2)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(2)),
11465 CATCH_TYPE_RETRY = __builtin_choose_expr( __builtin_constant_p(3), ((VALUE)(3)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(3)),
11466 CATCH_TYPE_BREAK = __builtin_choose_expr( __builtin_constant_p(4), ((VALUE)(4)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(4)),
11467 CATCH_TYPE_REDO = __builtin_choose_expr( __builtin_constant_p(5), ((VALUE)(5)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(5)),
11468 CATCH_TYPE_NEXT = __builtin_choose_expr( __builtin_constant_p(6), ((VALUE)(6)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(6))
11469 } type;
11470 rb_iseq_t *iseq;
11471 unsigned int start;
11472 unsigned int end;
11473 unsigned int cont;
11474 unsigned int sp;
11475};
11476struct iseq_catch_table { unsigned int size; struct iseq_catch_table_entry entries[]; } __attribute__((packed));
11477static inline int
11478iseq_catch_table_bytes(int n)
11479{
11480 enum {
11481 catch_table_entry_size = sizeof(struct iseq_catch_table_entry),
11482 catch_table_entries_max = (0x7fffffff - __builtin_offsetof (struct iseq_catch_table, entries)) / catch_table_entry_size
11483 };
11484 if (n > catch_table_entries_max) rb_fatal("too large iseq_catch_table - %d", n);
11485 return (int)(__builtin_offsetof (struct iseq_catch_table, entries) +
11486 n * catch_table_entry_size);
11487}
11489 struct iseq_compile_data_storage *next;
11490 unsigned int pos;
11491 unsigned int size;
11492 char buff[];
11493};
11494enum defined_type {
11495 DEFINED_NOT_DEFINED,
11496 DEFINED_NIL = 1,
11497 DEFINED_IVAR,
11498 DEFINED_LVAR,
11499 DEFINED_GVAR,
11500 DEFINED_CVAR,
11501 DEFINED_CONST,
11502 DEFINED_METHOD,
11503 DEFINED_YIELD,
11504 DEFINED_ZSUPER,
11505 DEFINED_SELF,
11506 DEFINED_TRUE,
11507 DEFINED_FALSE,
11508 DEFINED_ASGN,
11509 DEFINED_EXPR,
11510 DEFINED_IVAR2,
11511 DEFINED_REF,
11512 DEFINED_FUNC,
11513 DEFINED_CONST_FROM
11514};
11515VALUE rb_iseq_defined_string(enum defined_type type);
11516VALUE rb_iseq_local_variables(const rb_iseq_t *iseq);
11517
11518
11519enum rb_debug_counter_type {
11520RB_DEBUG_COUNTER_mc_inline_hit,
11521RB_DEBUG_COUNTER_mc_inline_miss_klass,
11522RB_DEBUG_COUNTER_mc_inline_miss_invalidated,
11523RB_DEBUG_COUNTER_mc_inline_miss_empty,
11524RB_DEBUG_COUNTER_mc_inline_miss_same_cc,
11525RB_DEBUG_COUNTER_mc_inline_miss_same_cme,
11526RB_DEBUG_COUNTER_mc_inline_miss_same_def,
11527RB_DEBUG_COUNTER_mc_inline_miss_diff,
11528RB_DEBUG_COUNTER_mc_cme_complement,
11529RB_DEBUG_COUNTER_mc_cme_complement_hit,
11530RB_DEBUG_COUNTER_mc_search,
11531RB_DEBUG_COUNTER_mc_search_notfound,
11532RB_DEBUG_COUNTER_mc_search_super,
11533RB_DEBUG_COUNTER_ci_packed,
11534RB_DEBUG_COUNTER_ci_kw,
11535RB_DEBUG_COUNTER_ci_nokw,
11536RB_DEBUG_COUNTER_ci_runtime,
11537RB_DEBUG_COUNTER_cc_new,
11538RB_DEBUG_COUNTER_cc_temp,
11539RB_DEBUG_COUNTER_cc_found_in_ccs,
11540RB_DEBUG_COUNTER_cc_not_found_in_ccs,
11541RB_DEBUG_COUNTER_cc_ent_invalidate,
11542RB_DEBUG_COUNTER_cc_cme_invalidate,
11543RB_DEBUG_COUNTER_cc_invalidate_leaf,
11544RB_DEBUG_COUNTER_cc_invalidate_leaf_ccs,
11545RB_DEBUG_COUNTER_cc_invalidate_leaf_callable,
11546RB_DEBUG_COUNTER_cc_invalidate_tree,
11547RB_DEBUG_COUNTER_cc_invalidate_tree_cme,
11548RB_DEBUG_COUNTER_cc_invalidate_tree_callable,
11549RB_DEBUG_COUNTER_cc_invalidate_negative,
11550RB_DEBUG_COUNTER_ccs_free,
11551RB_DEBUG_COUNTER_ccs_maxlen,
11552RB_DEBUG_COUNTER_ccs_found,
11553RB_DEBUG_COUNTER_ccs_not_found,
11554RB_DEBUG_COUNTER_call0_public,
11555RB_DEBUG_COUNTER_call0_other,
11556RB_DEBUG_COUNTER_gccct_hit,
11557RB_DEBUG_COUNTER_gccct_miss,
11558RB_DEBUG_COUNTER_gccct_null,
11559RB_DEBUG_COUNTER_iseq_num,
11560RB_DEBUG_COUNTER_iseq_cd_num,
11561RB_DEBUG_COUNTER_ccf_general,
11562RB_DEBUG_COUNTER_ccf_iseq_setup,
11563RB_DEBUG_COUNTER_ccf_iseq_setup_0start,
11564RB_DEBUG_COUNTER_ccf_iseq_setup_tailcall_0start,
11565RB_DEBUG_COUNTER_ccf_iseq_fix,
11566RB_DEBUG_COUNTER_ccf_iseq_opt,
11567RB_DEBUG_COUNTER_ccf_iseq_kw1,
11568RB_DEBUG_COUNTER_ccf_iseq_kw2,
11569RB_DEBUG_COUNTER_ccf_cfunc,
11570RB_DEBUG_COUNTER_ccf_cfunc_with_frame,
11571RB_DEBUG_COUNTER_ccf_ivar,
11572RB_DEBUG_COUNTER_ccf_attrset,
11573RB_DEBUG_COUNTER_ccf_method_missing,
11574RB_DEBUG_COUNTER_ccf_zsuper,
11575RB_DEBUG_COUNTER_ccf_bmethod,
11576RB_DEBUG_COUNTER_ccf_opt_send,
11577RB_DEBUG_COUNTER_ccf_opt_call,
11578RB_DEBUG_COUNTER_ccf_opt_block_call,
11579RB_DEBUG_COUNTER_ccf_super_method,
11580RB_DEBUG_COUNTER_frame_push,
11581RB_DEBUG_COUNTER_frame_push_method,
11582RB_DEBUG_COUNTER_frame_push_block,
11583RB_DEBUG_COUNTER_frame_push_class,
11584RB_DEBUG_COUNTER_frame_push_top,
11585RB_DEBUG_COUNTER_frame_push_cfunc,
11586RB_DEBUG_COUNTER_frame_push_ifunc,
11587RB_DEBUG_COUNTER_frame_push_eval,
11588RB_DEBUG_COUNTER_frame_push_rescue,
11589RB_DEBUG_COUNTER_frame_push_dummy,
11590RB_DEBUG_COUNTER_frame_R2R,
11591RB_DEBUG_COUNTER_frame_R2C,
11592RB_DEBUG_COUNTER_frame_C2C,
11593RB_DEBUG_COUNTER_frame_C2R,
11594RB_DEBUG_COUNTER_ivar_get_ic_hit,
11595RB_DEBUG_COUNTER_ivar_get_ic_miss,
11596RB_DEBUG_COUNTER_ivar_get_ic_miss_serial,
11597RB_DEBUG_COUNTER_ivar_get_ic_miss_unset,
11598RB_DEBUG_COUNTER_ivar_get_ic_miss_noobject,
11599RB_DEBUG_COUNTER_ivar_set_ic_hit,
11600RB_DEBUG_COUNTER_ivar_set_ic_miss,
11601RB_DEBUG_COUNTER_ivar_set_ic_miss_serial,
11602RB_DEBUG_COUNTER_ivar_set_ic_miss_unset,
11603RB_DEBUG_COUNTER_ivar_set_ic_miss_iv_hit,
11604RB_DEBUG_COUNTER_ivar_set_ic_miss_noobject,
11605RB_DEBUG_COUNTER_ivar_get_base,
11606RB_DEBUG_COUNTER_ivar_set_base,
11607RB_DEBUG_COUNTER_lvar_get,
11608RB_DEBUG_COUNTER_lvar_get_dynamic,
11609RB_DEBUG_COUNTER_lvar_set,
11610RB_DEBUG_COUNTER_lvar_set_dynamic,
11611RB_DEBUG_COUNTER_lvar_set_slowpath,
11612RB_DEBUG_COUNTER_gc_count,
11613RB_DEBUG_COUNTER_gc_minor_newobj,
11614RB_DEBUG_COUNTER_gc_minor_malloc,
11615RB_DEBUG_COUNTER_gc_minor_method,
11616RB_DEBUG_COUNTER_gc_minor_capi,
11617RB_DEBUG_COUNTER_gc_minor_stress,
11618RB_DEBUG_COUNTER_gc_major_nofree,
11619RB_DEBUG_COUNTER_gc_major_oldgen,
11620RB_DEBUG_COUNTER_gc_major_shady,
11621RB_DEBUG_COUNTER_gc_major_force,
11622RB_DEBUG_COUNTER_gc_major_oldmalloc,
11623RB_DEBUG_COUNTER_gc_enter_start,
11624RB_DEBUG_COUNTER_gc_enter_mark_continue,
11625RB_DEBUG_COUNTER_gc_enter_sweep_continue,
11626RB_DEBUG_COUNTER_gc_enter_rest,
11627RB_DEBUG_COUNTER_gc_enter_finalizer,
11628RB_DEBUG_COUNTER_gc_isptr_trial,
11629RB_DEBUG_COUNTER_gc_isptr_range,
11630RB_DEBUG_COUNTER_gc_isptr_align,
11631RB_DEBUG_COUNTER_gc_isptr_maybe,
11632RB_DEBUG_COUNTER_obj_newobj,
11633RB_DEBUG_COUNTER_obj_newobj_slowpath,
11634RB_DEBUG_COUNTER_obj_newobj_wb_unprotected,
11635RB_DEBUG_COUNTER_obj_free,
11636RB_DEBUG_COUNTER_obj_promote,
11637RB_DEBUG_COUNTER_obj_wb_unprotect,
11638RB_DEBUG_COUNTER_obj_obj_embed,
11639RB_DEBUG_COUNTER_obj_obj_transient,
11640RB_DEBUG_COUNTER_obj_obj_ptr,
11641RB_DEBUG_COUNTER_obj_str_ptr,
11642RB_DEBUG_COUNTER_obj_str_embed,
11643RB_DEBUG_COUNTER_obj_str_shared,
11644RB_DEBUG_COUNTER_obj_str_nofree,
11645RB_DEBUG_COUNTER_obj_str_fstr,
11646RB_DEBUG_COUNTER_obj_ary_embed,
11647RB_DEBUG_COUNTER_obj_ary_transient,
11648RB_DEBUG_COUNTER_obj_ary_ptr,
11649RB_DEBUG_COUNTER_obj_ary_extracapa,
11650RB_DEBUG_COUNTER_obj_ary_shared_create,
11651RB_DEBUG_COUNTER_obj_ary_shared,
11652RB_DEBUG_COUNTER_obj_ary_shared_root_occupied,
11653RB_DEBUG_COUNTER_obj_hash_empty,
11654RB_DEBUG_COUNTER_obj_hash_1,
11655RB_DEBUG_COUNTER_obj_hash_2,
11656RB_DEBUG_COUNTER_obj_hash_3,
11657RB_DEBUG_COUNTER_obj_hash_4,
11658RB_DEBUG_COUNTER_obj_hash_5_8,
11659RB_DEBUG_COUNTER_obj_hash_g8,
11660RB_DEBUG_COUNTER_obj_hash_null,
11661RB_DEBUG_COUNTER_obj_hash_ar,
11662RB_DEBUG_COUNTER_obj_hash_st,
11663RB_DEBUG_COUNTER_obj_hash_transient,
11664RB_DEBUG_COUNTER_obj_hash_force_convert,
11665RB_DEBUG_COUNTER_obj_struct_embed,
11666RB_DEBUG_COUNTER_obj_struct_transient,
11667RB_DEBUG_COUNTER_obj_struct_ptr,
11668RB_DEBUG_COUNTER_obj_data_empty,
11669RB_DEBUG_COUNTER_obj_data_xfree,
11670RB_DEBUG_COUNTER_obj_data_imm_free,
11671RB_DEBUG_COUNTER_obj_data_zombie,
11672RB_DEBUG_COUNTER_obj_match_under4,
11673RB_DEBUG_COUNTER_obj_match_ge4,
11674RB_DEBUG_COUNTER_obj_match_ge8,
11675RB_DEBUG_COUNTER_obj_match_ptr,
11676RB_DEBUG_COUNTER_obj_iclass_ptr,
11677RB_DEBUG_COUNTER_obj_class_ptr,
11678RB_DEBUG_COUNTER_obj_module_ptr,
11679RB_DEBUG_COUNTER_obj_bignum_ptr,
11680RB_DEBUG_COUNTER_obj_bignum_embed,
11681RB_DEBUG_COUNTER_obj_float,
11682RB_DEBUG_COUNTER_obj_complex,
11683RB_DEBUG_COUNTER_obj_rational,
11684RB_DEBUG_COUNTER_obj_regexp_ptr,
11685RB_DEBUG_COUNTER_obj_file_ptr,
11686RB_DEBUG_COUNTER_obj_symbol,
11687RB_DEBUG_COUNTER_obj_imemo_ment,
11688RB_DEBUG_COUNTER_obj_imemo_iseq,
11689RB_DEBUG_COUNTER_obj_imemo_env,
11690RB_DEBUG_COUNTER_obj_imemo_tmpbuf,
11691RB_DEBUG_COUNTER_obj_imemo_ast,
11692RB_DEBUG_COUNTER_obj_imemo_cref,
11693RB_DEBUG_COUNTER_obj_imemo_svar,
11694RB_DEBUG_COUNTER_obj_imemo_throw_data,
11695RB_DEBUG_COUNTER_obj_imemo_ifunc,
11696RB_DEBUG_COUNTER_obj_imemo_memo,
11697RB_DEBUG_COUNTER_obj_imemo_parser_strterm,
11698RB_DEBUG_COUNTER_obj_imemo_callinfo,
11699RB_DEBUG_COUNTER_obj_imemo_callcache,
11700RB_DEBUG_COUNTER_obj_imemo_constcache,
11701RB_DEBUG_COUNTER_artable_hint_hit,
11702RB_DEBUG_COUNTER_artable_hint_miss,
11703RB_DEBUG_COUNTER_artable_hint_notfound,
11704RB_DEBUG_COUNTER_heap_xmalloc,
11705RB_DEBUG_COUNTER_heap_xrealloc,
11706RB_DEBUG_COUNTER_heap_xfree,
11707RB_DEBUG_COUNTER_theap_alloc,
11708RB_DEBUG_COUNTER_theap_alloc_fail,
11709RB_DEBUG_COUNTER_theap_evacuate,
11710RB_DEBUG_COUNTER_vm_sync_lock,
11711RB_DEBUG_COUNTER_vm_sync_lock_enter,
11712RB_DEBUG_COUNTER_vm_sync_lock_enter_nb,
11713RB_DEBUG_COUNTER_vm_sync_lock_enter_cr,
11714RB_DEBUG_COUNTER_vm_sync_barrier,
11715RB_DEBUG_COUNTER_mjit_exec,
11716RB_DEBUG_COUNTER_mjit_exec_not_added,
11717RB_DEBUG_COUNTER_mjit_exec_not_ready,
11718RB_DEBUG_COUNTER_mjit_exec_not_compiled,
11719RB_DEBUG_COUNTER_mjit_exec_call_func,
11720RB_DEBUG_COUNTER_mjit_add_iseq_to_process,
11721RB_DEBUG_COUNTER_mjit_unload_units,
11722RB_DEBUG_COUNTER_mjit_frame_VM2VM,
11723RB_DEBUG_COUNTER_mjit_frame_VM2JT,
11724RB_DEBUG_COUNTER_mjit_frame_JT2JT,
11725RB_DEBUG_COUNTER_mjit_frame_JT2VM,
11726RB_DEBUG_COUNTER_mjit_cancel,
11727RB_DEBUG_COUNTER_mjit_cancel_ivar_inline,
11728RB_DEBUG_COUNTER_mjit_cancel_exivar_inline,
11729RB_DEBUG_COUNTER_mjit_cancel_send_inline,
11730RB_DEBUG_COUNTER_mjit_cancel_opt_insn,
11731RB_DEBUG_COUNTER_mjit_cancel_invalidate_all,
11732RB_DEBUG_COUNTER_mjit_cancel_leave,
11733RB_DEBUG_COUNTER_mjit_length_unit_queue,
11734RB_DEBUG_COUNTER_mjit_length_active_units,
11735RB_DEBUG_COUNTER_mjit_length_compact_units,
11736RB_DEBUG_COUNTER_mjit_length_stale_units,
11737RB_DEBUG_COUNTER_mjit_compile_failures,
11738 RB_DEBUG_COUNTER_MAX
11739};
11740void rb_debug_counter_show_results(const char *msg);
11741
11742
11743size_t ruby_debug_counter_get(const char **names_ptr, size_t *counters_ptr);
11744void ruby_debug_counter_reset(void);
11745void ruby_debug_counter_show_at_exit(int enable);
11746
11747
11748enum rb_mjit_iseq_func {
11749 NOT_ADDED_JIT_ISEQ_FUNC = 0,
11750 NOT_READY_JIT_ISEQ_FUNC = 1,
11751 NOT_COMPILED_JIT_ISEQ_FUNC = 2,
11752 LAST_JIT_ISEQ_FUNC = 3
11753};
11754struct mjit_options {
11755 char on;
11756 char save_temps;
11757 char warnings;
11758 char debug;
11759 char* debug_flags;
11760 unsigned int wait;
11761 unsigned int min_calls;
11762 int verbose;
11763 int max_cache_size;
11764};
11765struct rb_mjit_compile_info {
11766 _Bool disable_ivar_cache;
11767 _Bool disable_exivar_cache;
11768 _Bool disable_send_cache;
11769 _Bool disable_inlining;
11770 _Bool disable_const_cache;
11771};
11772typedef VALUE (*mjit_func_t)(rb_execution_context_t *, rb_control_frame_t *);
11773
11774
11775extern struct mjit_options mjit_opts;
11776extern _Bool mjit_call_p;
11777extern void rb_mjit_add_iseq_to_process(const rb_iseq_t *iseq);
11778extern VALUE rb_mjit_wait_call(rb_execution_context_t *ec, struct rb_iseq_constant_body *body);
11779extern struct rb_mjit_compile_info* rb_mjit_iseq_compile_info(const struct rb_iseq_constant_body *body);
11780extern void rb_mjit_recompile_send(const rb_iseq_t *iseq);
11781extern void rb_mjit_recompile_ivar(const rb_iseq_t *iseq);
11782extern void rb_mjit_recompile_exivar(const rb_iseq_t *iseq);
11783extern void rb_mjit_recompile_inlining(const rb_iseq_t *iseq);
11784extern void rb_mjit_recompile_const(const rb_iseq_t *iseq);
11785
11786
11787extern _Bool mjit_compile(FILE *f, const rb_iseq_t *iseq, const char *funcname, int id);
11788extern void mjit_init(const struct mjit_options *opts);
11789extern void mjit_gc_start_hook(void);
11790extern void mjit_gc_exit_hook(void);
11791extern void mjit_free_iseq(const rb_iseq_t *iseq);
11792extern void mjit_update_references(const rb_iseq_t *iseq);
11793extern void mjit_mark(void);
11794extern struct mjit_cont *mjit_cont_new(rb_execution_context_t *ec);
11795extern void mjit_cont_free(struct mjit_cont *cont);
11796extern void mjit_add_class_serial(rb_serial_t class_serial);
11797extern void mjit_remove_class_serial(rb_serial_t class_serial);
11798extern void mjit_mark_cc_entries(const struct rb_iseq_constant_body *const body);
11799static inline int
11800mjit_target_iseq_p(struct rb_iseq_constant_body *body)
11801{
11802 return (body->type == ISEQ_TYPE_METHOD || body->type == ISEQ_TYPE_BLOCK)
11803 && !body->builtin_inline_p
11804 && body->iseq_size < 1000;
11805}
11806__attribute__((__noinline__)) static __attribute__((__cold__)) VALUE mjit_exec_slowpath(rb_execution_context_t *ec, const rb_iseq_t *iseq, struct rb_iseq_constant_body *body);
11807static VALUE
11808mjit_exec_slowpath(rb_execution_context_t *ec, const rb_iseq_t *iseq, struct rb_iseq_constant_body *body)
11809{
11810 uintptr_t func_i = (uintptr_t)(body->jit_func);
11811 ((__builtin_expect(!!(!!(func_i <= LAST_JIT_ISEQ_FUNC)), 1)) ? ((void)0) : __builtin_unreachable());
11812 switch ((enum rb_mjit_iseq_func)func_i) {
11813 case NOT_ADDED_JIT_ISEQ_FUNC:
11814 ((void)0);
11815 if (body->total_calls == mjit_opts.min_calls && mjit_target_iseq_p(body)) {
11816 rb_mjit_add_iseq_to_process(iseq);
11817 if ((__builtin_expect(!!(mjit_opts.wait), 0))) {
11818 return rb_mjit_wait_call(ec, body);
11819 }
11820 }
11821 break;
11822 case NOT_READY_JIT_ISEQ_FUNC:
11823 ((void)0);
11824 break;
11825 case NOT_COMPILED_JIT_ISEQ_FUNC:
11826 ((void)0);
11827 break;
11828 default:
11829 break;
11830 }
11831 return ((VALUE)RUBY_Qundef);
11832}
11833static inline VALUE
11834mjit_exec(rb_execution_context_t *ec)
11835{
11836 const rb_iseq_t *iseq;
11837 struct rb_iseq_constant_body *body;
11838 if (!mjit_call_p)
11839 return ((VALUE)RUBY_Qundef);
11840 ((void)0);
11841 iseq = ec->cfp->iseq;
11842 body = iseq->body;
11843 body->total_calls++;
11844 mjit_func_t func = body->jit_func;
11845 if ((__builtin_expect(!!((uintptr_t)func <= LAST_JIT_ISEQ_FUNC), 0))) {
11846 ((void)0);
11847 return mjit_exec_slowpath(ec, iseq, body);
11848 }
11849 ((void)0);
11850 ((void)0);
11851 return func(ec, ec->cfp);
11852}
11853void mjit_child_after_fork(void);
11854VALUE mjit_pause(_Bool wait_p);
11855VALUE mjit_resume(void);
11856void mjit_finish(_Bool close_handle_p);
11857
11858
11859typedef struct rb_vm_struct ruby_vm_t;
11861void ruby_vm_at_exit(void(*func)(ruby_vm_t *));
11862
11863
11864enum vm_call_flag_bits {
11865 VM_CALL_ARGS_SPLAT_bit,
11866 VM_CALL_ARGS_BLOCKARG_bit,
11867 VM_CALL_FCALL_bit,
11868 VM_CALL_VCALL_bit,
11869 VM_CALL_ARGS_SIMPLE_bit,
11870 VM_CALL_BLOCKISEQ_bit,
11871 VM_CALL_KWARG_bit,
11872 VM_CALL_KW_SPLAT_bit,
11873 VM_CALL_TAILCALL_bit,
11874 VM_CALL_SUPER_bit,
11875 VM_CALL_ZSUPER_bit,
11876 VM_CALL_OPT_SEND_bit,
11877 VM_CALL_KW_SPLAT_MUT_bit,
11878 VM_CALL__END
11879};
11880struct rb_callinfo_kwarg {
11881 int keyword_len;
11882 VALUE keywords[];
11883};
11884static inline size_t
11885rb_callinfo_kwarg_bytes(int keyword_len)
11886{
11887 return rb_size_mul_add_or_raise(
11888 keyword_len,
11889 sizeof(VALUE),
11890 sizeof(struct rb_callinfo_kwarg),
11891 rb_eRuntimeError);
11892}
11893struct rb_callinfo {
11894 VALUE flags;
11895 const struct rb_callinfo_kwarg *kwarg;
11896 VALUE mid;
11897 VALUE flag;
11898 VALUE argc;
11899};
11900static inline _Bool
11901vm_ci_packed_p(const struct rb_callinfo *ci)
11902{
11903 if ((__builtin_expect(!!(((VALUE)ci) & 0x01), 1))) {
11904 return 1;
11905 }
11906 else {
11907 ((void)0);
11908 return 0;
11909 }
11910}
11911static inline _Bool
11912vm_ci_p(const struct rb_callinfo *ci)
11913{
11914 if (vm_ci_packed_p(ci) || imemo_type_p((VALUE)ci, imemo_callinfo)) {
11915 return 1;
11916 }
11917 else {
11918 return 0;
11919 }
11920}
11921static inline ID
11922vm_ci_mid(const struct rb_callinfo *ci)
11923{
11924 if (vm_ci_packed_p(ci)) {
11925 return (((VALUE)ci) >> (1 + 15 + 16)) & ((((VALUE)1)<<32) - 1);
11926 }
11927 else {
11928 return (ID)ci->mid;
11929 }
11930}
11931static inline unsigned int
11932vm_ci_flag(const struct rb_callinfo *ci)
11933{
11934 if (vm_ci_packed_p(ci)) {
11935 return (unsigned int)((((VALUE)ci) >> (1 + 15)) & ((((VALUE)1)<<16) - 1));
11936 }
11937 else {
11938 return (unsigned int)ci->flag;
11939 }
11940}
11941static inline unsigned int
11942vm_ci_argc(const struct rb_callinfo *ci)
11943{
11944 if (vm_ci_packed_p(ci)) {
11945 return (unsigned int)((((VALUE)ci) >> (1)) & ((((VALUE)1)<<15) - 1));
11946 }
11947 else {
11948 return (unsigned int)ci->argc;
11949 }
11950}
11951static inline const struct rb_callinfo_kwarg *
11952vm_ci_kwarg(const struct rb_callinfo *ci)
11953{
11954 if (vm_ci_packed_p(ci)) {
11955 return ((void *)0);
11956 }
11957 else {
11958 return ci->kwarg;
11959 }
11960}
11961static inline void
11962vm_ci_dump(const struct rb_callinfo *ci)
11963{
11964 if (vm_ci_packed_p(ci)) {
11965 fprintf(stderr, "packed_ci ID:%s flag:%x argc:%u\n",
11966 rb_id2name(vm_ci_mid(ci)), vm_ci_flag(ci), vm_ci_argc(ci));
11967 }
11968 else {
11969 rb_obj_info_dump_loc((VALUE)(ci), "./vm_callinfo.h", 176, __func__);
11970 }
11971}
11972static inline const struct rb_callinfo *
11973vm_ci_new_(ID mid, unsigned int flag, unsigned int argc, const struct rb_callinfo_kwarg *kwarg, const char *file, int line)
11974{
11975 if ((((mid ) & ~((((VALUE)1)<<32) - 1)) ? 0 : ((flag) & ~((((VALUE)1)<<16) - 1)) ? 0 : ((argc) & ~((((VALUE)1)<<15) - 1)) ? 0 : (kwarg) ? 0 : 1)) {
11976 ((void)0);
11977 return ((const struct rb_callinfo *) ((((VALUE)(mid )) << (1 + 15 + 16)) | (((VALUE)(flag)) << (1 + 15)) | (((VALUE)(argc)) << (1)) | RUBY_FIXNUM_FLAG));
11978 }
11979 const _Bool debug = 0;
11980 if (debug) fprintf(stderr, "%s:%d ", file, line);
11981 const struct rb_callinfo *ci = (const struct rb_callinfo *)
11982 rb_imemo_new(imemo_callinfo,
11983 (VALUE)mid,
11984 (VALUE)flag,
11985 (VALUE)argc,
11986 (VALUE)kwarg);
11987 if (debug) rb_obj_info_dump_loc((VALUE)(ci), "./vm_callinfo.h", 217, __func__);
11988 if (kwarg) {
11989 ((void)0);
11990 }
11991 else {
11992 ((void)0);
11993 }
11994 ((void)0);
11995 ((void)0);
11996 return ci;
11997}
11998static inline const struct rb_callinfo *
11999vm_ci_new_runtime_(ID mid, unsigned int flag, unsigned int argc, const struct rb_callinfo_kwarg *kwarg, const char *file, int line)
12000{
12001 ((void)0);
12002 return vm_ci_new_(mid, flag, argc, kwarg, file, line);
12003}
12004static inline _Bool
12005vm_ci_markable(const struct rb_callinfo *ci)
12006{
12007 if (! ci) {
12008 return 0;
12009 }
12010 else if (vm_ci_packed_p(ci)) {
12011 return 1;
12012 }
12013 else {
12014 ((void)0);
12015 return ! RB_FL_ANY_RAW((VALUE)ci, ((VALUE)RUBY_FL_USER4));
12016 }
12017}
12018typedef VALUE (*vm_call_handler)(
12019 struct rb_execution_context_struct *ec,
12020 struct rb_control_frame_struct *cfp,
12021 struct rb_calling_info *calling);
12022struct rb_callcache {
12023 const VALUE flags;
12024 const VALUE klass;
12025 const struct rb_callable_method_entry_struct * const cme_;
12026 const vm_call_handler call_;
12027 union {
12028 const unsigned int attr_index;
12029 const enum method_missing_reason method_missing_reason;
12030 VALUE v;
12031 } aux_;
12032};
12033static inline const struct rb_callcache *
12034vm_cc_new(VALUE klass,
12035 const struct rb_callable_method_entry_struct *cme,
12036 vm_call_handler call)
12037{
12038 const struct rb_callcache *cc = (const struct rb_callcache *)rb_imemo_new(imemo_callcache, (VALUE)cme, (VALUE)call, 0, klass);
12039 ((void)0);
12040 return cc;
12041}
12042static inline _Bool
12043vm_cc_class_check(const struct rb_callcache *cc, VALUE klass)
12044{
12045 ((void)0);
12046 ((void)0);
12047 return cc->klass == klass;
12048}
12049static inline const struct rb_callable_method_entry_struct *
12050vm_cc_cme(const struct rb_callcache *cc)
12051{
12052 ((void)0);
12053 return cc->cme_;
12054}
12055static inline vm_call_handler
12056vm_cc_call(const struct rb_callcache *cc)
12057{
12058 ((void)0);
12059 return cc->call_;
12060}
12061static inline unsigned int
12062vm_cc_attr_index(const struct rb_callcache *cc)
12063{
12064 ((void)0);
12065 return cc->aux_.attr_index;
12066}
12067static inline unsigned int
12068vm_cc_cmethod_missing_reason(const struct rb_callcache *cc)
12069{
12070 ((void)0);
12071 return cc->aux_.method_missing_reason;
12072}
12073static inline int
12074vm_cc_markable(const struct rb_callcache *cc)
12075{
12076 ((void)0);
12077 return RB_FL_TEST_RAW((VALUE)cc, ((VALUE)RUBY_FL_USER4)) == 0;
12078}
12079static inline _Bool
12080vm_cc_invalidated_p(const struct rb_callcache *cc)
12081{
12082 if (cc->klass && ((vm_cc_cme(cc))->flags & ((VALUE)RUBY_FL_USER9))) {
12083 return 0;
12084 }
12085 else {
12086 return 1;
12087 }
12088}
12089static inline _Bool
12090vm_cc_valid_p(const struct rb_callcache *cc, const rb_callable_method_entry_t *cc_cme, VALUE klass)
12091{
12092 ((void)0);
12093 if (cc->klass == klass && !((cc_cme)->flags & ((VALUE)RUBY_FL_USER9))) {
12094 return 1;
12095 }
12096 else {
12097 return 0;
12098 }
12099}
12100extern const struct rb_callcache *rb_vm_empty_cc(void);
12101static inline void
12102vm_cc_call_set(const struct rb_callcache *cc, vm_call_handler call)
12103{
12104 ((void)0);
12105 ((void)0);
12106 *(vm_call_handler *)&cc->call_ = call;
12107}
12108static inline void
12109vm_cc_attr_index_set(const struct rb_callcache *cc, int index)
12110{
12111 ((void)0);
12112 ((void)0);
12113 *(int *)&cc->aux_.attr_index = index;
12114}
12115static inline void
12116vm_cc_method_missing_reason_set(const struct rb_callcache *cc, enum method_missing_reason reason)
12117{
12118 ((void)0);
12119 ((void)0);
12120 *(enum method_missing_reason *)&cc->aux_.method_missing_reason = reason;
12121}
12122static inline void
12123vm_cc_invalidate(const struct rb_callcache *cc)
12124{
12125 ((void)0);
12126 ((void)0);
12127 ((void)0);
12128 *(VALUE *)&cc->klass = 0;
12129 ((void)0);
12130}
12131struct rb_call_data {
12132 const struct rb_callinfo *ci;
12133 const struct rb_callcache *cc;
12134};
12135struct rb_class_cc_entries {
12136 int capa;
12137 int len;
12138 const struct rb_callable_method_entry_struct *cme;
12139 struct rb_class_cc_entries_entry {
12140 const struct rb_callinfo *ci;
12141 const struct rb_callcache *cc;
12142 } *entries;
12143};
12144void rb_vm_ccs_free(struct rb_class_cc_entries *ccs);
12145
12146
12147VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE v);
12148ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id);
12149NODE *ruby_debug_print_node(int level, int debug_level, const char *header, const NODE *node);
12150int ruby_debug_print_indent(int level, int debug_level, int indent_level);
12151void ruby_debug_gc_check_func(void);
12152void ruby_set_debug_option(const char *str);
12153
12154
12155extern enum ruby_debug_log_mode {
12156 ruby_debug_log_disabled = 0x00,
12157 ruby_debug_log_memory = 0x01,
12158 ruby_debug_log_stderr = 0x02,
12159 ruby_debug_log_file = 0x04,
12160} ruby_debug_log_mode;
12161void ruby_debug_log(const char *file, int line, const char *func_name, const char *fmt, ...);
12162void ruby_debug_log_print(unsigned int n);
12163_Bool ruby_debug_log_filter(const char *func_name);
12164typedef long OFFSET;
12165typedef unsigned long lindex_t;
12166typedef VALUE GENTRY;
12167typedef rb_iseq_t *ISEQ;
12168
12169
12170extern VALUE ruby_vm_const_missing_count;
12171extern rb_serial_t ruby_vm_global_constant_state;
12172extern rb_serial_t ruby_vm_class_serial;
12173
12174
12175static inline void
12176CC_SET_FASTPATH(const struct rb_callcache *cc, vm_call_handler func, _Bool enabled)
12177{
12178 if ((__builtin_expect(!!(enabled), 1))) {
12179 vm_cc_call_set(cc, func);
12180 }
12181}
12182static inline struct vm_throw_data *
12183THROW_DATA_NEW(VALUE val, const rb_control_frame_t *cf, int st)
12184{
12185 struct vm_throw_data *obj = (struct vm_throw_data *)rb_imemo_new(imemo_throw_data, val, (VALUE)cf, 0, 0);
12186 obj->throw_state = st;
12187 return obj;
12188}
12189static inline VALUE
12190THROW_DATA_VAL(const struct vm_throw_data *obj)
12191{
12192 ((void)0);
12193 return obj->throw_obj;
12194}
12195static inline const rb_control_frame_t *
12196THROW_DATA_CATCH_FRAME(const struct vm_throw_data *obj)
12197{
12198 ((void)0);
12199 return obj->catch_frame;
12200}
12201static inline int
12202THROW_DATA_STATE(const struct vm_throw_data *obj)
12203{
12204 ((void)0);
12205 return obj->throw_state;
12206}
12207static inline int
12208THROW_DATA_CONSUMED_P(const struct vm_throw_data *obj)
12209{
12210 ((void)0);
12211 return obj->flags & ((VALUE)RUBY_FL_USER4);
12212}
12213static inline void
12214THROW_DATA_CATCH_FRAME_SET(struct vm_throw_data *obj, const rb_control_frame_t *cfp)
12215{
12216 ((void)0);
12217 obj->catch_frame = cfp;
12218}
12219static inline void
12220THROW_DATA_STATE_SET(struct vm_throw_data *obj, int st)
12221{
12222 ((void)0);
12223 obj->throw_state = st;
12224}
12225static inline void
12226THROW_DATA_CONSUMED_SET(struct vm_throw_data *obj)
12227{
12228 if (imemo_throw_data_p((VALUE)obj) &&
12229 THROW_DATA_STATE(obj) == RUBY_TAG_BREAK) {
12230 obj->flags |= ((VALUE)RUBY_FL_USER4);
12231 }
12232}
12233static inline _Bool
12234vm_call_iseq_optimizable_p(const struct rb_callinfo *ci, const struct rb_callcache *cc)
12235{
12236 return !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) &&
12237 !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED);
12238}
12240 void (*mark)(void *ptr);
12241 void (*free)(void *ptr);
12242};
12244
12245
12246extern VALUE rb_cRactor;
12247VALUE rb_ractor_stdin(void);
12248VALUE rb_ractor_stdout(void);
12249VALUE rb_ractor_stderr(void);
12250void rb_ractor_stdin_set(VALUE);
12251void rb_ractor_stdout_set(VALUE);
12252void rb_ractor_stderr_set(VALUE);
12261VALUE rb_ractor_make_shareable(VALUE obj);
12262VALUE rb_ractor_make_shareable_copy(VALUE obj);
12263
12264
12265static inline _Bool
12266rb_ractor_shareable_p(VALUE obj)
12267{
12268 _Bool rb_ractor_shareable_p_continue(VALUE obj);
12269 if (RB_SPECIAL_CONST_P(obj)) {
12270 return 1;
12271 }
12272 else if (RB_FL_TEST_RAW((obj), RUBY_FL_SHAREABLE)) {
12273 return 1;
12274 }
12275 else {
12276 return rb_ractor_shareable_p_continue(obj);
12277 }
12278}
12279enum rb_ractor_basket_type {
12280 basket_type_none,
12281 basket_type_ref,
12282 basket_type_copy,
12283 basket_type_move,
12284 basket_type_will,
12285 basket_type_deleted,
12286 basket_type_reserved,
12287};
12289 _Bool exception;
12290 enum rb_ractor_basket_type type;
12291 VALUE v;
12292 VALUE sender;
12293};
12295 struct rb_ractor_basket *baskets;
12296 int start;
12297 int cnt;
12298 int size;
12299 unsigned int serial;
12300 unsigned int reserved_cnt;
12301};
12303 int cnt;
12304 int size;
12305 rb_ractor_t **ractors;
12306};
12310 struct rb_ractor_queue incoming_queue;
12311 struct rb_ractor_waiting_list taking_ractors;
12312 _Bool incoming_port_closed;
12313 _Bool outgoing_port_closed;
12315 enum ractor_wait_status {
12316 wait_none = 0x00,
12317 wait_receiving = 0x01,
12318 wait_taking = 0x02,
12319 wait_yielding = 0x04,
12320 } status;
12321 enum ractor_wakeup_status {
12322 wakeup_none,
12323 wakeup_by_send,
12324 wakeup_by_yield,
12325 wakeup_by_take,
12326 wakeup_by_close,
12327 wakeup_by_interrupt,
12328 wakeup_by_retry,
12329 } wakeup_status;
12330 struct rb_ractor_basket yielded_basket;
12331 struct rb_ractor_basket taken_basket;
12332 } wait;
12333};
12335 struct rb_ractor_pub pub;
12336 struct rb_ractor_sync sync;
12337 VALUE receiving_mutex;
12338 _Bool yield_atexit;
12339 rb_nativethread_cond_t barrier_wait_cond;
12340 struct {
12341 struct list_head set;
12342 unsigned int cnt;
12343 unsigned int blocking_cnt;
12344 unsigned int sleeper;
12346 rb_execution_context_t *running_ec;
12347 rb_thread_t *main;
12348 } threads;
12349 VALUE thgroup_default;
12350 VALUE name;
12351 VALUE loc;
12352 enum ractor_status {
12353 ractor_created,
12354 ractor_running,
12355 ractor_blocking,
12356 ractor_terminated,
12357 } status_;
12358 struct list_node vmlr_node;
12359 st_table *local_storage;
12360 struct rb_id_table *idkey_local_storage;
12361 VALUE r_stdin;
12362 VALUE r_stdout;
12363 VALUE r_stderr;
12364 VALUE verbose;
12365 VALUE debug;
12366 rb_ractor_newobj_cache_t newobj_cache;
12368 void *data;
12369 void (*mark_func)(VALUE v, void *data);
12370 } *mfd;
12371};
12372static inline VALUE
12373rb_ractor_self(const rb_ractor_t *r)
12374{
12375 return r->pub.self;
12376}
12377rb_ractor_t *rb_ractor_main_alloc(void);
12378void rb_ractor_main_setup(rb_vm_t *vm, rb_ractor_t *main_ractor, rb_thread_t *main_thread);
12379void rb_ractor_atexit(rb_execution_context_t *ec, VALUE result);
12380void rb_ractor_atexit_exception(rb_execution_context_t *ec);
12381void rb_ractor_teardown(rb_execution_context_t *ec);
12382void rb_ractor_receive_parameters(rb_execution_context_t *ec, rb_ractor_t *g, int len, VALUE *ptr);
12383void rb_ractor_send_parameters(rb_execution_context_t *ec, rb_ractor_t *g, VALUE args);
12384VALUE rb_thread_create_ractor(rb_ractor_t *g, VALUE args, VALUE proc);
12385rb_global_vm_lock_t *rb_ractor_gvl(rb_ractor_t *);
12386int rb_ractor_living_thread_num(const rb_ractor_t *);
12387VALUE rb_ractor_thread_list(rb_ractor_t *r);
12388void rb_ractor_living_threads_init(rb_ractor_t *r);
12389void rb_ractor_living_threads_insert(rb_ractor_t *r, rb_thread_t *th);
12390void rb_ractor_living_threads_remove(rb_ractor_t *r, rb_thread_t *th);
12391void rb_ractor_blocking_threads_inc(rb_ractor_t *r, const char *file, int line);
12392void rb_ractor_blocking_threads_dec(rb_ractor_t *r, const char *file, int line);
12393void rb_ractor_vm_barrier_interrupt_running_thread(rb_ractor_t *r);
12394void rb_ractor_terminate_interrupt_main_thread(rb_ractor_t *r);
12395void rb_ractor_terminate_all(void);
12396_Bool rb_ractor_main_p_(void);
12397void rb_ractor_finish_marking(void);
12398void rb_ractor_atfork(rb_vm_t *vm, rb_thread_t *th);
12399VALUE rb_ractor_ensure_shareable(VALUE obj, VALUE name);
12400
12401
12402_Bool rb_ractor_shareable_p_continue(VALUE obj);
12403void rb_ractor_local_storage_delkey(rb_ractor_local_key_t key);
12404
12405
12406static inline _Bool
12407rb_ractor_main_p(void)
12408{
12409 if (ruby_single_main_ractor) {
12410 return 1;
12411 }
12412 else {
12413 return rb_ractor_main_p_();
12414 }
12415}
12416static inline _Bool
12417rb_ractor_status_p(rb_ractor_t *r, enum ractor_status status)
12418{
12419 return r->status_ == status;
12420}
12421static inline void
12422rb_ractor_sleeper_threads_inc(rb_ractor_t *r)
12423{
12424 r->threads.sleeper++;
12425}
12426static inline void
12427rb_ractor_sleeper_threads_dec(rb_ractor_t *r)
12428{
12429 r->threads.sleeper--;
12430}
12431static inline void
12432rb_ractor_sleeper_threads_clear(rb_ractor_t *r)
12433{
12434 r->threads.sleeper = 0;
12435}
12436static inline int
12437rb_ractor_sleeper_thread_num(rb_ractor_t *r)
12438{
12439 return r->threads.sleeper;
12440}
12441static inline void
12442rb_ractor_thread_switch(rb_ractor_t *cr, rb_thread_t *th)
12443{
12444 if (cr->threads.running_ec != th->ec) {
12445 if (0) fprintf(stderr, "rb_ractor_thread_switch ec:%p->%p\n",
12446 (void *)cr->threads.running_ec, (void *)th->ec);
12447 }
12448 else {
12449 return;
12450 }
12451 if (cr->threads.running_ec != th->ec) {
12452 th->running_time_us = 0;
12453 }
12454 cr->threads.running_ec = th->ec;
12455 ((void)0);
12456}
12457static inline void
12458rb_ractor_set_current_ec(rb_ractor_t *cr, rb_execution_context_t *ec)
12459{
12460 ruby_current_ec = ec;
12461 if (cr->threads.running_ec != ec) {
12462 if (0) fprintf(stderr, "rb_ractor_set_current_ec ec:%p->%p\n",
12463 (void *)cr->threads.running_ec, (void *)ec);
12464 }
12465 else {
12466 ((void)0);
12467 }
12468 cr->threads.running_ec = ec;
12469}
12470void rb_vm_ractor_blocking_cnt_inc(rb_vm_t *vm, rb_ractor_t *cr, const char *file, int line);
12471void rb_vm_ractor_blocking_cnt_dec(rb_vm_t *vm, rb_ractor_t *cr, const char *file, int line);
12472static inline uint32_t
12473rb_ractor_id(const rb_ractor_t *r)
12474{
12475 return r->pub.id;
12476}
12477_Bool rb_vm_locked_p(void);
12478void rb_vm_lock_body(void);
12479void rb_vm_unlock_body(void);
12480struct rb_ractor_struct;
12481void rb_vm_lock_enter_body_cr(struct rb_ractor_struct *cr, unsigned int *lev );
12482void rb_vm_lock_enter_body_nb(unsigned int *lev );
12483void rb_vm_lock_enter_body(unsigned int *lev );
12484void rb_vm_lock_leave_body(unsigned int *lev );
12485void rb_vm_barrier(void);
12486extern struct rb_ractor_struct *ruby_single_main_ractor;
12487static inline _Bool
12488rb_multi_ractor_p(void)
12489{
12490 if ((__builtin_expect(!!(ruby_single_main_ractor), 1))) {
12491 ((void)0);
12492 return 0;
12493 }
12494 else {
12495 return 1;
12496 }
12497}
12498static inline void
12499rb_vm_lock(const char *file, int line)
12500{
12501 ((void)0);
12502 if (rb_multi_ractor_p()) {
12503 rb_vm_lock_body();
12504 }
12505}
12506static inline void
12507rb_vm_unlock(const char *file, int line)
12508{
12509 if (rb_multi_ractor_p()) {
12510 rb_vm_unlock_body();
12511 }
12512}
12513static inline void
12514rb_vm_lock_enter(unsigned int *lev, const char *file, int line)
12515{
12516 ((void)0);
12517 if (rb_multi_ractor_p()) {
12518 rb_vm_lock_enter_body(lev );
12519 }
12520}
12521static inline void
12522rb_vm_lock_enter_nb(unsigned int *lev, const char *file, int line)
12523{
12524 ((void)0);
12525 if (rb_multi_ractor_p()) {
12526 rb_vm_lock_enter_body_nb(lev );
12527 }
12528}
12529static inline void
12530rb_vm_lock_leave(unsigned int *lev, const char *file, int line)
12531{
12532 if (rb_multi_ractor_p()) {
12533 rb_vm_lock_leave_body(lev );
12534 }
12535}
12536static inline void
12537rb_vm_lock_enter_cr(struct rb_ractor_struct *cr, unsigned int *levp, const char *file, int line)
12538{
12539 ((void)0);
12540 rb_vm_lock_enter_body_cr(cr, levp );
12541}
12542static inline void
12543rb_vm_lock_leave_cr(struct rb_ractor_struct *cr, unsigned int *levp, const char *file, int line)
12544{
12545 rb_vm_lock_leave_body(levp );
12546}
12547struct rb_builtin_function {
12548 const void * const func_ptr;
12549 const int argc;
12550 const int index;
12551 const char * const name;
12552 void (*compiler)(FILE *, long, unsigned, _Bool);
12553};
12554void rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table);
12555static inline void rb_builtin_function_check_arity0(VALUE (*f)(rb_execution_context_t *ec, VALUE self)){}
12556static inline void rb_builtin_function_check_arity1(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE)){}
12557static inline void rb_builtin_function_check_arity2(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE)){}
12558static inline void rb_builtin_function_check_arity3(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE)){}
12559static inline void rb_builtin_function_check_arity4(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE)){}
12560static inline void rb_builtin_function_check_arity5(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE)){}
12561static inline void rb_builtin_function_check_arity6(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
12562static inline void rb_builtin_function_check_arity7(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
12563static inline void rb_builtin_function_check_arity8(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
12564static inline void rb_builtin_function_check_arity9(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
12565static inline void rb_builtin_function_check_arity10(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
12566static inline void rb_builtin_function_check_arity11(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
12567static inline void rb_builtin_function_check_arity12(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
12568static inline void rb_builtin_function_check_arity13(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
12569static inline void rb_builtin_function_check_arity14(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
12570static inline void rb_builtin_function_check_arity15(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}static inline
12571VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index);
12572__attribute__((__pure__)) static inline VALUE rb_vm_lvar(rb_execution_context_t *ec, int index);
12573static inline VALUE
12574rb_vm_lvar(rb_execution_context_t *ec, int index)
12575{
12576 return ec->cfp->ep[index];
12577}
12578struct builtin_binary {
12579 const char *feature;
12580 const unsigned char *bin;
12581 size_t bin_size;
12582};
12584 const char *classname;
12585 const char *methodname;
12586 const char *filename;
12587 int line_no;
12588 volatile VALUE klass;
12589 volatile VALUE name;
12590};
12591
12592
12593__attribute__((__noinline__)) int rb_dtrace_setup(rb_execution_context_t *, VALUE, ID, struct ruby_dtrace_method_hook_args *);
12594
12595
12596VALUE rb_str_concat_literals(size_t, const VALUE*);
12597__attribute__ ((__visibility__("default"))) extern
12598VALUE rb_vm_exec(rb_execution_context_t *, _Bool);
12599__attribute__((__pure__)) static inline const VALUE *VM_EP_LEP(const VALUE *);
12600static inline const VALUE *
12601VM_EP_LEP(const VALUE *ep)
12602{
12603 while (!VM_ENV_LOCAL_P(ep)) {
12604 ep = VM_ENV_PREV_EP(ep);
12605 }
12606 return ep;
12607}
12608static inline const rb_control_frame_t *
12609rb_vm_search_cf_from_ep(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE * const ep)
12610{
12611 if (!ep) {
12612 return ((void *)0);
12613 }
12614 else {
12615 const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec);
12616 while (cfp < eocfp) {
12617 if (cfp->ep == ep) {
12618 return cfp;
12619 }
12620 cfp = ((cfp)+1);
12621 }
12622 return ((void *)0);
12623 }
12624}static inline
12625const VALUE *
12626rb_vm_ep_local_ep(const VALUE *ep)
12627{
12628 return VM_EP_LEP(ep);
12629}
12630__attribute__((__pure__)) static inline const VALUE *VM_CF_LEP(const rb_control_frame_t * const cfp);
12631static inline const VALUE *
12632VM_CF_LEP(const rb_control_frame_t * const cfp)
12633{
12634 return VM_EP_LEP(cfp->ep);
12635}
12636static inline const VALUE *
12637VM_CF_PREV_EP(const rb_control_frame_t * const cfp)
12638{
12639 return VM_ENV_PREV_EP(cfp->ep);
12640}
12641__attribute__((__pure__)) static inline VALUE VM_CF_BLOCK_HANDLER(const rb_control_frame_t * const cfp);
12642static inline VALUE
12643VM_CF_BLOCK_HANDLER(const rb_control_frame_t * const cfp)
12644{
12645 const VALUE *ep = VM_CF_LEP(cfp);
12646 return VM_ENV_BLOCK_HANDLER(ep);
12647}static inline
12648int
12649rb_vm_cframe_keyword_p(const rb_control_frame_t *cfp)
12650{
12651 return VM_FRAME_CFRAME_KW_P(cfp);
12652}static inline
12653VALUE
12654rb_vm_frame_block_handler(const rb_control_frame_t *cfp)
12655{
12656 return VM_CF_BLOCK_HANDLER(cfp);
12657}
12658static struct rb_captured_block *
12659VM_CFP_TO_CAPTURED_BLOCK(const rb_control_frame_t *cfp)
12660{
12661 ((void)0);
12662 return (struct rb_captured_block *)&cfp->self;
12663}
12664static rb_control_frame_t *
12665VM_CAPTURED_BLOCK_TO_CFP(const struct rb_captured_block *captured)
12666{
12667 rb_control_frame_t *cfp = ((rb_control_frame_t *)((VALUE *)(captured) - 3));
12668 ((void)0);
12669 ((void)0);
12670 return cfp;
12671}
12672static int
12673VM_BH_FROM_CFP_P(VALUE block_handler, const rb_control_frame_t *cfp)
12674{
12675 const struct rb_captured_block *captured = VM_CFP_TO_CAPTURED_BLOCK(cfp);
12676 return ((void *)((block_handler) & ~0x03)) == captured;
12677}
12678static VALUE
12679vm_passed_block_handler(rb_execution_context_t *ec)
12680{
12681 VALUE block_handler = ec->passed_block_handler;
12682 ec->passed_block_handler = 0;
12683 vm_block_handler_verify(block_handler);
12684 return block_handler;
12685}
12686static rb_cref_t *
12687vm_cref_new0(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval, int use_prev_prev)
12688{
12689 VALUE refinements = ((VALUE)RUBY_Qnil);
12690 int omod_shared = 0;
12691 rb_cref_t *cref;
12692 union {
12694 VALUE value;
12695 } scope_visi;
12696 scope_visi.visi.method_visi = visi;
12697 scope_visi.visi.module_func = module_func;
12698 if (prev_cref != ((void *)0) && prev_cref != (void *)1 ) {
12699 refinements = CREF_REFINEMENTS(prev_cref);
12700 if (!RB_NIL_P(refinements)) {
12701 omod_shared = 1;
12702 CREF_OMOD_SHARED_SET(prev_cref);
12703 }
12704 }
12705 cref = (rb_cref_t *)rb_imemo_new(imemo_cref, klass, (VALUE)(use_prev_prev ? CREF_NEXT(prev_cref) : prev_cref), scope_visi.value, refinements);
12706 if (pushed_by_eval) CREF_PUSHED_BY_EVAL_SET(cref);
12707 if (omod_shared) CREF_OMOD_SHARED_SET(cref);
12708 return cref;
12709}
12710static rb_cref_t *
12711vm_cref_new(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval)
12712{
12713 return vm_cref_new0(klass, visi, module_func, prev_cref, pushed_by_eval, 0);
12714}
12715static rb_cref_t *
12716vm_cref_new_use_prev(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval)
12717{
12718 return vm_cref_new0(klass, visi, module_func, prev_cref, pushed_by_eval, 1);
12719}
12720static int
12721ref_delete_symkey(VALUE key, VALUE value, VALUE unused)
12722{
12723 return RB_SYMBOL_P(key) ? ST_DELETE : ST_CONTINUE;
12724}
12725static rb_cref_t *
12726vm_cref_dup(const rb_cref_t *cref)
12727{
12728 VALUE klass = CREF_CLASS(cref);
12729 const rb_scope_visibility_t *visi = CREF_SCOPE_VISI(cref);
12730 rb_cref_t *next_cref = CREF_NEXT(cref), *new_cref;
12731 int pushed_by_eval = CREF_PUSHED_BY_EVAL(cref);
12732 new_cref = vm_cref_new(klass, visi->method_visi, visi->module_func, next_cref, pushed_by_eval);
12733 if (!RB_NIL_P(CREF_REFINEMENTS(cref))) {
12734 VALUE ref = rb_hash_dup(CREF_REFINEMENTS(cref));
12735 rb_hash_foreach(ref, ref_delete_symkey, ((VALUE)RUBY_Qnil));
12736 CREF_REFINEMENTS_SET(new_cref, ref);
12737 CREF_OMOD_SHARED_UNSET(new_cref);
12738 }
12739 return new_cref;
12740}
12741static rb_cref_t *
12742vm_cref_new_toplevel(rb_execution_context_t *ec)
12743{
12744 rb_cref_t *cref = vm_cref_new(rb_cObject, METHOD_VISI_PRIVATE , 0, ((void *)0), 0);
12745 VALUE top_wrapper = rb_ec_thread_ptr(ec)->top_wrapper;
12746 if (top_wrapper) {
12747 cref = vm_cref_new(top_wrapper, METHOD_VISI_PRIVATE, 0, cref, 0);
12748 }
12749 return cref;
12750}static inline
12751rb_cref_t *
12752rb_vm_cref_new_toplevel(void)
12753{
12754 return vm_cref_new_toplevel(rb_current_execution_context(1));
12755}
12756static void
12757vm_cref_dump(const char *mesg, const rb_cref_t *cref)
12758{
12759 fprintf(stderr, "vm_cref_dump: %s (%p)\n", mesg, (void *)cref);
12760 while (cref) {
12761 fprintf(stderr, "= cref| klass: %s\n", RSTRING_PTR(rb_class_path(CREF_CLASS(cref))));
12762 cref = CREF_NEXT(cref);
12763 }
12764}static inline
12765void
12766rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep)
12767{
12768 *((const VALUE **)&dst->as.captured.ep) = ep;
12769 (rb_obj_written((VALUE)(obj), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(VM_ENV_ENVVAL(ep)), "./vm.c", 329));
12770}
12771static void
12772vm_bind_update_env(VALUE bindval, rb_binding_t *bind, VALUE envval)
12773{
12774 const rb_env_t *env = (rb_env_t *)envval;
12775 rb_obj_write((VALUE)(bindval), __extension__({
12776 ;
12777 ; __typeof__((VALUE *)(&bind->block.as.captured.code.iseq)) unaligned_member_access_result = ((VALUE *)(&bind->block.as.captured.code.iseq));
12778 ; unaligned_member_access_result; }), (VALUE)(env->iseq), "./vm.c", 336);
12779 rb_vm_block_ep_update(bindval, &bind->block, env->ep);
12780}
12781static VALUE vm_make_env_object(const rb_execution_context_t *ec, rb_control_frame_t *cfp);
12782extern VALUE rb_vm_invoke_bmethod(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self,
12783 int argc, const VALUE *argv, int kw_splat, VALUE block_handler,
12784 const rb_callable_method_entry_t *me);
12785static VALUE vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler);
12786typedef enum {
12787 CONST_DEPRECATED = 0x100,
12788 CONST_VISIBILITY_MASK = 0xff,
12789 CONST_PUBLIC = 0x00,
12790 CONST_PRIVATE,
12791 CONST_VISIBILITY_MAX
12792} rb_const_flag_t;
12793typedef struct rb_const_entry_struct {
12794 rb_const_flag_t flag;
12795 int line;
12796 VALUE value;
12797 VALUE file;
12799VALUE rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj);
12800VALUE rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj);
12801VALUE rb_mod_deprecate_constant(int argc, const VALUE *argv, VALUE obj);
12802void rb_free_const_table(struct rb_id_table *tbl);
12803VALUE rb_const_source_location(VALUE, ID);
12804
12805
12806int rb_autoloading_value(VALUE mod, ID id, VALUE *value, rb_const_flag_t *flag);
12807rb_const_entry_t *rb_const_lookup(VALUE klass, ID id);
12808VALUE rb_public_const_get_at(VALUE klass, ID id);
12809VALUE rb_public_const_get_from(VALUE klass, ID id);
12810int rb_public_const_defined_from(VALUE klass, ID id);
12811VALUE rb_const_source_location_at(VALUE, ID);
12812
12813
12814enum {
12815 cmp_opt_Integer,
12816 cmp_opt_String,
12817 cmp_opt_Float,
12818 cmp_optimizable_count
12819};
12820struct cmp_opt_data {
12821 unsigned int opt_methods;
12822 unsigned int opt_inited;
12823};
12824VALUE rb_invcmp(VALUE, VALUE);
12825struct ar_table_struct;
12826typedef unsigned char ar_hint_t;
12827enum ruby_rhash_flags {
12828 RHASH_PASS_AS_KEYWORDS = ((VALUE)RUBY_FL_USER1),
12829 RHASH_PROC_DEFAULT = ((VALUE)RUBY_FL_USER2),
12830 RHASH_ST_TABLE_FLAG = ((VALUE)RUBY_FL_USER3),
12831 RHASH_AR_TABLE_SIZE_MASK = (((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6)|((VALUE)RUBY_FL_USER7)),
12832 RHASH_AR_TABLE_SIZE_SHIFT = (((VALUE)RUBY_FL_USHIFT)+4),
12833 RHASH_AR_TABLE_BOUND_MASK = (((VALUE)RUBY_FL_USER8)|((VALUE)RUBY_FL_USER9)|((VALUE)RUBY_FL_USER10)|((VALUE)RUBY_FL_USER11)),
12834 RHASH_AR_TABLE_BOUND_SHIFT = (((VALUE)RUBY_FL_USHIFT)+8),
12835 RHASH_TRANSIENT_FLAG = ((VALUE)RUBY_FL_USER12),
12836 RHASH_LEV_SHIFT = (((VALUE)RUBY_FL_USHIFT) + 13),
12837 RHASH_LEV_MAX = 127,
12838};
12839struct RHash {
12840 struct RBasic basic;
12841 union {
12842 st_table *st;
12843 struct ar_table_struct *ar;
12844 } as;
12845 const VALUE ifnone;
12846 union {
12847 ar_hint_t ary[8];
12848 VALUE word;
12849 } ar_hint;
12850};
12851void rb_hash_st_table_set(VALUE hash, st_table *st);
12852VALUE rb_hash_default_value(VALUE hash, VALUE key);
12853VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc);
12854long rb_dbl_long_hash(double d);
12855st_table *rb_init_identtable(void);
12856VALUE rb_to_hash_type(VALUE obj);
12857VALUE rb_hash_key_str(VALUE);
12858VALUE rb_hash_values(VALUE hash);
12859VALUE rb_hash_rehash(VALUE hash);
12860int rb_hash_add_new_element(VALUE hash, VALUE key, VALUE val);
12861VALUE rb_hash_set_pair(VALUE hash, VALUE pair);
12862int rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval);
12863int rb_hash_stlike_foreach_with_replace(VALUE hash, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg);
12864int rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func *func, st_data_t arg);
12865extern st_table *rb_hash_st_table(VALUE hash);
12866static inline unsigned RHASH_AR_TABLE_SIZE_RAW(VALUE h);
12867static inline VALUE RHASH_IFNONE(VALUE h);
12868static inline size_t RHASH_SIZE(VALUE h);
12869static inline _Bool RHASH_EMPTY_P(VALUE h);
12870static inline _Bool RHASH_AR_TABLE_P(VALUE h);
12871static inline _Bool RHASH_ST_TABLE_P(VALUE h);
12872static inline struct ar_table_struct *RHASH_AR_TABLE(VALUE h);
12873static inline st_table *RHASH_ST_TABLE(VALUE h);
12874static inline size_t RHASH_ST_SIZE(VALUE h);
12875static inline void RHASH_ST_CLEAR(VALUE h);
12876static inline _Bool RHASH_TRANSIENT_P(VALUE h);
12877static inline void RHASH_SET_TRANSIENT_FLAG(VALUE h);
12878static inline void RHASH_UNSET_TRANSIENT_FLAG(VALUE h);
12879
12880
12881VALUE rb_hash_delete_entry(VALUE hash, VALUE key);
12882VALUE rb_ident_hash_new(void);
12883int rb_hash_stlike_foreach(VALUE hash, st_foreach_callback_func *func, st_data_t arg);
12884
12885
12886
12887
12888VALUE rb_hash_new_with_size(st_index_t size);
12889VALUE rb_hash_resurrect(VALUE hash);
12890int rb_hash_stlike_lookup(VALUE hash, st_data_t key, st_data_t *pval);
12891VALUE rb_hash_keys(VALUE hash);
12892VALUE rb_hash_has_key(VALUE hash, VALUE key);
12893VALUE rb_hash_compare_by_id_p(VALUE hash);
12894st_table *rb_hash_tbl_raw(VALUE hash, const char *file, int line);
12895
12896
12897static inline _Bool
12898RHASH_AR_TABLE_P(VALUE h)
12899{
12900 return ! RB_FL_TEST_RAW(h, RHASH_ST_TABLE_FLAG);
12901}
12902static inline struct ar_table_struct *
12903RHASH_AR_TABLE(VALUE h)
12904{
12905 return ((struct RHash *)(h))->as.ar;
12906}
12907static inline st_table *
12908RHASH_ST_TABLE(VALUE h)
12909{
12910 return ((struct RHash *)(h))->as.st;
12911}
12912static inline VALUE
12913RHASH_IFNONE(VALUE h)
12914{
12915 return ((struct RHash *)(h))->ifnone;
12916}
12917static inline size_t
12918RHASH_SIZE(VALUE h)
12919{
12920 if (RHASH_AR_TABLE_P(h)) {
12921 return RHASH_AR_TABLE_SIZE_RAW(h);
12922 }
12923 else {
12924 return RHASH_ST_SIZE(h);
12925 }
12926}
12927static inline _Bool
12928RHASH_EMPTY_P(VALUE h)
12929{
12930 return RHASH_SIZE(h) == 0;
12931}
12932static inline _Bool
12933RHASH_ST_TABLE_P(VALUE h)
12934{
12935 return ! RHASH_AR_TABLE_P(h);
12936}
12937static inline size_t
12938RHASH_ST_SIZE(VALUE h)
12939{
12940 return RHASH_ST_TABLE(h)->num_entries;
12941}
12942static inline void
12943RHASH_ST_CLEAR(VALUE h)
12944{
12945 RB_FL_UNSET_RAW(h, RHASH_ST_TABLE_FLAG);
12946 ((struct RHash *)(h))->as.ar = ((void *)0);
12947}
12948static inline unsigned
12949RHASH_AR_TABLE_SIZE_RAW(VALUE h)
12950{
12951 VALUE ret = RB_FL_TEST_RAW(h, RHASH_AR_TABLE_SIZE_MASK);
12952 ret >>= RHASH_AR_TABLE_SIZE_SHIFT;
12953 return (unsigned)ret;
12954}
12955static inline _Bool
12956RHASH_TRANSIENT_P(VALUE h)
12957{
12958 return RB_FL_TEST_RAW(h, RHASH_TRANSIENT_FLAG);
12959}
12960static inline void
12961RHASH_SET_TRANSIENT_FLAG(VALUE h)
12962{
12963 RB_FL_SET_RAW(h, RHASH_TRANSIENT_FLAG);
12964}
12965static inline void
12966RHASH_UNSET_TRANSIENT_FLAG(VALUE h)
12967{
12968 RB_FL_UNSET_RAW(h, RHASH_TRANSIENT_FLAG);
12969}
12970enum rb_int_parse_flags {
12971 RB_INT_PARSE_SIGN = 0x01,
12972 RB_INT_PARSE_UNDERSCORE = 0x02,
12973 RB_INT_PARSE_PREFIX = 0x04,
12974 RB_INT_PARSE_ALL = 0x07,
12975 RB_INT_PARSE_DEFAULT = 0x07,
12976};
12977struct RBignum {
12978 struct RBasic basic;
12979 union {
12980 struct {
12981 size_t len;
12982 unsigned int *digits;
12983 } heap;
12984 unsigned int ary[(8*RVALUE_EMBED_LEN_MAX/4)];
12985 } as;
12986};
12987extern const char ruby_digitmap[];
12988double rb_big_fdiv_double(VALUE x, VALUE y);
12989VALUE rb_big_uminus(VALUE x);
12990VALUE rb_big_hash(VALUE);
12991VALUE rb_big_odd_p(VALUE);
12992VALUE rb_big_even_p(VALUE);
12993size_t rb_big_size(VALUE);
12994VALUE rb_integer_float_cmp(VALUE x, VALUE y);
12995VALUE rb_integer_float_eq(VALUE x, VALUE y);
12996VALUE rb_str_convert_to_inum(VALUE str, int base, int badcheck, int raise_exception);
12997VALUE rb_big_comp(VALUE x);
12998VALUE rb_big_aref(VALUE x, VALUE y);
12999VALUE rb_big_abs(VALUE x);
13000VALUE rb_big_size_m(VALUE big);
13001VALUE rb_big_bit_length(VALUE big);
13002VALUE rb_big_remainder(VALUE x, VALUE y);
13003VALUE rb_big_gt(VALUE x, VALUE y);
13004VALUE rb_big_ge(VALUE x, VALUE y);
13005VALUE rb_big_lt(VALUE x, VALUE y);
13006VALUE rb_big_le(VALUE x, VALUE y);
13007VALUE rb_int_powm(int const argc, VALUE * const argv, VALUE const num);
13008static inline _Bool BIGNUM_SIGN(VALUE b);
13009static inline _Bool BIGNUM_POSITIVE_P(VALUE b);
13010static inline _Bool BIGNUM_NEGATIVE_P(VALUE b);
13011static inline void BIGNUM_SET_SIGN(VALUE b, _Bool sign);
13012static inline void BIGNUM_NEGATE(VALUE b);
13013static inline size_t BIGNUM_LEN(VALUE b);
13014static inline unsigned int *BIGNUM_DIGITS(VALUE b);
13015static inline int BIGNUM_LENINT(VALUE b);
13016static inline _Bool BIGNUM_EMBED_P(VALUE b);
13017
13018
13019VALUE rb_big_mul_normal(VALUE x, VALUE y);
13020VALUE rb_big_mul_balance(VALUE x, VALUE y);
13021VALUE rb_big_mul_karatsuba(VALUE x, VALUE y);
13022VALUE rb_big_mul_toom3(VALUE x, VALUE y);
13023VALUE rb_big_sq_fast(VALUE x);
13024VALUE rb_big_divrem_normal(VALUE x, VALUE y);
13025VALUE rb_big2str_poweroftwo(VALUE x, int base);
13026VALUE rb_big2str_generic(VALUE x, int base);
13027VALUE rb_str2big_poweroftwo(VALUE arg, int base, int badcheck);
13028VALUE rb_str2big_normal(VALUE arg, int base, int badcheck);
13029VALUE rb_str2big_karatsuba(VALUE arg, int base, int badcheck);
13030VALUE rb_big_mul_gmp(VALUE x, VALUE y);
13031VALUE rb_big_divrem_gmp(VALUE x, VALUE y);
13032VALUE rb_big2str_gmp(VALUE x, int base);
13033VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck);
13034VALUE rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits, int base, int flags);
13035
13036
13037
13038
13039VALUE rb_int128t2big(__int128 n);
13040
13041
13042static inline _Bool
13043BIGNUM_SIGN(VALUE b)
13044{
13045 return RB_FL_TEST_RAW(b, ((VALUE)RUBY_FL_USER1));
13046}
13047static inline _Bool
13048BIGNUM_POSITIVE_P(VALUE b)
13049{
13050 return BIGNUM_SIGN(b);
13051}
13052static inline _Bool
13053BIGNUM_NEGATIVE_P(VALUE b)
13054{
13055 return ! BIGNUM_POSITIVE_P(b);
13056}
13057static inline void
13058BIGNUM_SET_SIGN(VALUE b, _Bool sign)
13059{
13060 if (sign) {
13061 RB_FL_SET_RAW(b, ((VALUE)RUBY_FL_USER1));
13062 }
13063 else {
13064 RB_FL_UNSET_RAW(b, ((VALUE)RUBY_FL_USER1));
13065 }
13066}
13067static inline void
13068BIGNUM_NEGATE(VALUE b)
13069{
13070 RB_FL_REVERSE_RAW(b, ((VALUE)RUBY_FL_USER1));
13071}
13072static inline size_t
13073BIGNUM_LEN(VALUE b)
13074{
13075 if (! BIGNUM_EMBED_P(b)) {
13076 return ((struct RBignum *)(b))->as.heap.len;
13077 }
13078 else {
13079 size_t ret = ((struct RBasic *)(b))->flags;
13080 ret &= (~(~(VALUE)0U << 3) << (((VALUE)RUBY_FL_USHIFT)+3));
13081 ret >>= (((VALUE)RUBY_FL_USHIFT)+3);
13082 return ret;
13083 }
13084}
13085static inline int
13086BIGNUM_LENINT(VALUE b)
13087{
13088 return rb_long2int_inline(BIGNUM_LEN(b));
13089}
13090static inline unsigned int *
13091BIGNUM_DIGITS(VALUE b)
13092{
13093 if (BIGNUM_EMBED_P(b)) {
13094 return ((struct RBignum *)(b))->as.ary;
13095 }
13096 else {
13097 return ((struct RBignum *)(b))->as.heap.digits;
13098 }
13099}
13100static inline _Bool
13101BIGNUM_EMBED_P(VALUE b)
13102{
13103 return RB_FL_TEST_RAW(b, ((VALUE)((VALUE)RUBY_FL_USER2)));
13104}
13105static inline uint16_t ruby_swap16(uint16_t);
13106static inline uint32_t ruby_swap32(uint32_t);
13107static inline uint64_t ruby_swap64(uint64_t);
13108static inline unsigned nlz_int(unsigned x);
13109static inline unsigned nlz_long(unsigned long x);
13110static inline unsigned nlz_long_long(unsigned long long x);
13111static inline unsigned nlz_intptr(uintptr_t x);
13112static inline unsigned nlz_int32(uint32_t x);
13113static inline unsigned nlz_int64(uint64_t x);
13114static inline unsigned nlz_int128(unsigned __int128 x);
13115static inline unsigned rb_popcount32(uint32_t x);
13116static inline unsigned rb_popcount64(uint64_t x);
13117static inline unsigned rb_popcount_intptr(uintptr_t x);
13118static inline int ntz_int32(uint32_t x);
13119static inline int ntz_int64(uint64_t x);
13120static inline int ntz_intptr(uintptr_t x);
13121static inline VALUE RUBY_BIT_ROTL(VALUE, int);
13122static inline VALUE RUBY_BIT_ROTR(VALUE, int);
13123static inline uint16_t
13124ruby_swap16(uint16_t x)
13125{
13126 return __builtin_bswap16(x);
13127}
13128static inline uint32_t
13129ruby_swap32(uint32_t x)
13130{
13131 return __builtin_bswap32(x);
13132}
13133static inline uint64_t
13134ruby_swap64(uint64_t x)
13135{
13136 return __builtin_bswap64(x);
13137}
13138static inline unsigned int
13139nlz_int32(uint32_t x)
13140{
13141 __extension__ _Static_assert(sizeof(int) * 8 == 32, "sizeof_int" ": " "sizeof(int) * CHAR_BIT == 32");
13142 return x ? (unsigned int)__builtin_clz(x) : 32;
13143}
13144static inline unsigned int
13145nlz_int64(uint64_t x)
13146{
13147 if (x == 0) {
13148 return 64;
13149 }
13150 else if (sizeof(long) * 8 == 64) {
13151 return (unsigned int)__builtin_clzl((unsigned long)x);
13152 }
13153 else if (sizeof(long long) * 8 == 64) {
13154 return (unsigned int)__builtin_clzll((unsigned long long)x);
13155 }
13156 else {
13157 __builtin_unreachable();
13158 }
13159}
13160static inline unsigned int
13161nlz_int128(unsigned __int128 x)
13162{
13163 uint64_t y = (uint64_t)(x >> 64);
13164 if (x == 0) {
13165 return 128;
13166 }
13167 else if (y == 0) {
13168 return (unsigned int)nlz_int64(x) + 64;
13169 }
13170 else {
13171 return (unsigned int)nlz_int64(y);
13172 }
13173}
13174static inline unsigned int
13175nlz_int(unsigned int x)
13176{
13177 if (sizeof(unsigned int) * 8 == 32) {
13178 return nlz_int32((uint32_t)x);
13179 }
13180 else if (sizeof(unsigned int) * 8 == 64) {
13181 return nlz_int64((uint64_t)x);
13182 }
13183 else {
13184 __builtin_unreachable();
13185 }
13186}
13187static inline unsigned int
13188nlz_long(unsigned long x)
13189{
13190 if (sizeof(unsigned long) * 8 == 32) {
13191 return nlz_int32((uint32_t)x);
13192 }
13193 else if (sizeof(unsigned long) * 8 == 64) {
13194 return nlz_int64((uint64_t)x);
13195 }
13196 else {
13197 __builtin_unreachable();
13198 }
13199}
13200static inline unsigned int
13201nlz_long_long(unsigned long long x)
13202{
13203 if (sizeof(unsigned long long) * 8 == 64) {
13204 return nlz_int64((uint64_t)x);
13205 }
13206 else if (sizeof(unsigned long long) * 8 == 128) {
13207 return nlz_int128((unsigned __int128)x);
13208 }
13209 else {
13210 __builtin_unreachable();
13211 }
13212}
13213static inline unsigned int
13214nlz_intptr(uintptr_t x)
13215{
13216 if (sizeof(uintptr_t) == sizeof(unsigned int)) {
13217 return nlz_int((unsigned int)x);
13218 }
13219 if (sizeof(uintptr_t) == sizeof(unsigned long)) {
13220 return nlz_long((unsigned long)x);
13221 }
13222 if (sizeof(uintptr_t) == sizeof(unsigned long long)) {
13223 return nlz_long_long((unsigned long long)x);
13224 }
13225 else {
13226 __builtin_unreachable();
13227 }
13228}
13229static inline unsigned int
13230rb_popcount32(uint32_t x)
13231{
13232 __extension__ _Static_assert(sizeof(int) * 8 >= 32, "sizeof_int" ": " "sizeof(int) * CHAR_BIT >= 32");
13233 return (unsigned int)__builtin_popcount(x);
13234}
13235static inline unsigned int
13236rb_popcount64(uint64_t x)
13237{
13238 if (sizeof(long) * 8 == 64) {
13239 return (unsigned int)__builtin_popcountl((unsigned long)x);
13240 }
13241 else if (sizeof(long long) * 8 == 64) {
13242 return (unsigned int)__builtin_popcountll((unsigned long long)x);
13243 }
13244 else {
13245 __builtin_unreachable();
13246 }
13247}
13248static inline unsigned int
13249rb_popcount_intptr(uintptr_t x)
13250{
13251 if (sizeof(uintptr_t) * 8 == 64) {
13252 return rb_popcount64((uint64_t)x);
13253 }
13254 else if (sizeof(uintptr_t) * 8 == 32) {
13255 return rb_popcount32((uint32_t)x);
13256 }
13257 else {
13258 __builtin_unreachable();
13259 }
13260}
13261static inline int
13262ntz_int32(uint32_t x)
13263{
13264 __extension__ _Static_assert(sizeof(int) * 8 == 32, "sizeof_int" ": " "sizeof(int) * CHAR_BIT == 32");
13265 return x ? (unsigned)__builtin_ctz(x) : 32;
13266}
13267static inline int
13268ntz_int64(uint64_t x)
13269{
13270 if (x == 0) {
13271 return 64;
13272 }
13273 else if (sizeof(long) * 8 == 64) {
13274 return (unsigned)__builtin_ctzl((unsigned long)x);
13275 }
13276 else if (sizeof(long long) * 8 == 64) {
13277 return (unsigned)__builtin_ctzll((unsigned long long)x);
13278 }
13279 else {
13280 __builtin_unreachable();
13281 }
13282}
13283static inline int
13284ntz_intptr(uintptr_t x)
13285{
13286 if (sizeof(uintptr_t) * 8 == 64) {
13287 return ntz_int64((uint64_t)x);
13288 }
13289 else if (sizeof(uintptr_t) * 8 == 32) {
13290 return ntz_int32((uint32_t)x);
13291 }
13292 else {
13293 __builtin_unreachable();
13294 }
13295}
13296static inline VALUE
13297RUBY_BIT_ROTL(VALUE v, int n)
13298{
13299 const int m = (sizeof(VALUE) * 8) - 1;
13300 return (v << (n & m)) | (v >> (-n & m));
13301}
13302static inline VALUE
13303RUBY_BIT_ROTR(VALUE v, int n)
13304{
13305 const int m = (sizeof(VALUE) * 8) - 1;
13306 return (v << (-n & m)) | (v >> (n & m));
13307}
13308VALUE rb_int128t2big(__int128 n);
13309static inline long rb_overflowed_fix_to_int(long x);
13310static inline VALUE rb_fix_plus_fix(VALUE x, VALUE y);
13311static inline VALUE rb_fix_minus_fix(VALUE x, VALUE y);
13312static inline VALUE rb_fix_mul_fix(VALUE x, VALUE y);
13313static inline void rb_fix_divmod_fix(VALUE x, VALUE y, VALUE *divp, VALUE *modp);
13314static inline VALUE rb_fix_div_fix(VALUE x, VALUE y);
13315static inline VALUE rb_fix_mod_fix(VALUE x, VALUE y);
13316static inline _Bool FIXNUM_POSITIVE_P(VALUE num);
13317static inline _Bool FIXNUM_NEGATIVE_P(VALUE num);
13318static inline _Bool FIXNUM_ZERO_P(VALUE num);
13319static inline long
13320rb_overflowed_fix_to_int(long x)
13321{
13322 return (long)((unsigned long)(x >> 1) ^ (1LU << (8 * 8 - 1)));
13323}
13324static inline VALUE
13325rb_fix_plus_fix(VALUE x, VALUE y)
13326{
13327 long lz;
13328 if (__builtin_add_overflow((long)x, (long)y-1, &lz)) {
13329 return rb_int2big(rb_overflowed_fix_to_int(lz));
13330 }
13331 else {
13332 return (VALUE)lz;
13333 }
13334}
13335static inline VALUE
13336rb_fix_minus_fix(VALUE x, VALUE y)
13337{
13338 long lz;
13339 if (__builtin_sub_overflow((long)x, (long)y-1, &lz)) {
13340 return rb_int2big(rb_overflowed_fix_to_int(lz));
13341 }
13342 else {
13343 return (VALUE)lz;
13344 }
13345}
13346static inline VALUE
13347rb_fix_mul_fix(VALUE x, VALUE y)
13348{
13349 long lx = rb_fix2long(x);
13350 long ly = rb_fix2long(y);
13351 return (((((__int128)lx * (__int128)ly) < (0x7fffffffffffffffL / 2) + 1) && (((__int128)lx * (__int128)ly) >= ((-0x7fffffffffffffffL - 1L) / 2))) ? RB_INT2FIX((__int128)lx * (__int128)ly) : rb_int128t2big((__int128)lx * (__int128)ly));
13352}
13353static inline void
13354rb_fix_divmod_fix(VALUE a, VALUE b, VALUE *divp, VALUE *modp)
13355{
13356 long x = rb_fix2long(a);
13357 long y = rb_fix2long(b);
13358 long div, mod;
13359 if (x == ((-0x7fffffffffffffffL - 1L) / 2) && y == -1) {
13360 if (divp) *divp = rb_long2num_inline(-((-0x7fffffffffffffffL - 1L) / 2));
13361 if (modp) *modp = RB_INT2FIX(0);
13362 return;
13363 }
13364 div = x / y;
13365 mod = x % y;
13366 if (y > 0 ? mod < 0 : mod > 0) {
13367 mod += y;
13368 div -= 1;
13369 }
13370 if (divp) *divp = RB_INT2FIX(div);
13371 if (modp) *modp = RB_INT2FIX(mod);
13372}
13373static inline VALUE
13374rb_fix_div_fix(VALUE x, VALUE y)
13375{
13376 VALUE div;
13377 rb_fix_divmod_fix(x, y, &div, ((void *)0));
13378 return div;
13379}
13380static inline VALUE
13381rb_fix_mod_fix(VALUE x, VALUE y)
13382{
13383 VALUE mod;
13384 rb_fix_divmod_fix(x, y, ((void *)0), &mod);
13385 return mod;
13386}
13387static inline _Bool
13388FIXNUM_POSITIVE_P(VALUE num)
13389{
13390 return (long)num > (long)__builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0));
13391}
13392static inline _Bool
13393FIXNUM_NEGATIVE_P(VALUE num)
13394{
13395 return (long)num < 0;
13396}
13397static inline _Bool
13398FIXNUM_ZERO_P(VALUE num)
13399{
13400 return num == __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0));
13401}
13402enum ruby_num_rounding_mode {
13403 RUBY_NUM_ROUND_HALF_UP,
13404 RUBY_NUM_ROUND_HALF_EVEN,
13405 RUBY_NUM_ROUND_HALF_DOWN,
13406 RUBY_NUM_ROUND_DEFAULT = RUBY_NUM_ROUND_HALF_UP,
13407};
13408struct RFloat {
13409 struct RBasic basic;
13410 double float_value;
13411};
13412int rb_num_to_uint(VALUE val, unsigned int *ret);
13413VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
13414double ruby_float_step_size(double beg, double end, double unit, int excl);
13415int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless);
13416int rb_num_negative_p(VALUE);
13417VALUE rb_int_succ(VALUE num);
13418VALUE rb_float_uminus(VALUE num);
13419VALUE rb_int_plus(VALUE x, VALUE y);
13420VALUE rb_float_plus(VALUE x, VALUE y);
13421VALUE rb_int_minus(VALUE x, VALUE y);
13422VALUE rb_float_minus(VALUE x, VALUE y);
13423VALUE rb_int_mul(VALUE x, VALUE y);
13424VALUE rb_float_mul(VALUE x, VALUE y);
13425VALUE rb_float_div(VALUE x, VALUE y);
13426VALUE rb_int_idiv(VALUE x, VALUE y);
13427VALUE rb_int_modulo(VALUE x, VALUE y);
13428VALUE rb_int2str(VALUE num, int base);
13429VALUE rb_fix_plus(VALUE x, VALUE y);
13430VALUE rb_int_gt(VALUE x, VALUE y);
13431VALUE rb_float_gt(VALUE x, VALUE y);
13432VALUE rb_int_ge(VALUE x, VALUE y);
13433enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts);
13434double rb_int_fdiv_double(VALUE x, VALUE y);
13435VALUE rb_int_pow(VALUE x, VALUE y);
13436VALUE rb_float_pow(VALUE x, VALUE y);
13437VALUE rb_int_cmp(VALUE x, VALUE y);
13438VALUE rb_int_equal(VALUE x, VALUE y);
13439VALUE rb_int_divmod(VALUE x, VALUE y);
13440VALUE rb_int_and(VALUE x, VALUE y);
13441VALUE rb_int_lshift(VALUE x, VALUE y);
13442VALUE rb_int_div(VALUE x, VALUE y);
13443int rb_int_positive_p(VALUE num);
13444int rb_int_negative_p(VALUE num);
13445VALUE rb_num_pow(VALUE x, VALUE y);
13446VALUE rb_float_ceil(VALUE num, int ndigits);
13447VALUE rb_float_floor(VALUE x, int ndigits);
13448VALUE rb_float_abs(VALUE flt);
13449static inline VALUE rb_num_compare_with_zero(VALUE num, ID mid);
13450static inline int rb_num_positive_int_p(VALUE num);
13451static inline int rb_num_negative_int_p(VALUE num);
13452static inline double rb_float_flonum_value(VALUE v);
13453static inline double rb_float_noflonum_value(VALUE v);
13454static inline double rb_float_value_inline(VALUE v);
13455static inline VALUE rb_float_new_inline(double d);
13456static inline _Bool INT_POSITIVE_P(VALUE num);
13457static inline _Bool INT_NEGATIVE_P(VALUE num);
13458static inline _Bool FLOAT_ZERO_P(VALUE num);
13459
13460
13461VALUE rb_int_positive_pow(long x, unsigned long y);
13462
13463
13464
13465
13466VALUE rb_flo_div_flo(VALUE x, VALUE y);
13467double ruby_float_mod(double x, double y);
13468VALUE rb_float_equal(VALUE x, VALUE y);
13469int rb_float_cmp(VALUE x, VALUE y);
13470VALUE rb_float_eql(VALUE x, VALUE y);
13471VALUE rb_fix_aref(VALUE fix, VALUE idx);
13472VALUE rb_int_zero_p(VALUE num);
13473VALUE rb_int_even_p(VALUE num);
13474VALUE rb_int_odd_p(VALUE num);
13475VALUE rb_int_abs(VALUE num);
13476VALUE rb_int_bit_length(VALUE num);
13477VALUE rb_int_uminus(VALUE num);
13478VALUE rb_int_comp(VALUE num);
13479
13480
13481static inline _Bool
13482INT_POSITIVE_P(VALUE num)
13483{
13484 if (RB_FIXNUM_P(num)) {
13485 return FIXNUM_POSITIVE_P(num);
13486 }
13487 else {
13488 return BIGNUM_POSITIVE_P(num);
13489 }
13490}
13491static inline _Bool
13492INT_NEGATIVE_P(VALUE num)
13493{
13494 if (RB_FIXNUM_P(num)) {
13495 return FIXNUM_NEGATIVE_P(num);
13496 }
13497 else {
13498 return BIGNUM_NEGATIVE_P(num);
13499 }
13500}
13501static inline _Bool
13502FLOAT_ZERO_P(VALUE num)
13503{
13504 return rb_float_value_inline(num) == 0.0;
13505}
13506static inline VALUE
13507rb_num_compare_with_zero(VALUE num, ID mid)
13508{
13509 VALUE zero = __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0));
13510 VALUE r = rb_check_funcall(num, mid, 1, &zero);
13511 if (r == ((VALUE)RUBY_Qundef)) {
13512 rb_cmperr(num, zero);
13513 }
13514 return r;
13515}
13516static inline int
13517rb_num_positive_int_p(VALUE num)
13518{
13519 const ID mid = '>';
13520 if (RB_FIXNUM_P(num)) {
13522 return FIXNUM_POSITIVE_P(num);
13523 }
13524 else if (RB_TYPE_P(num, RUBY_T_BIGNUM)) {
13526 return BIGNUM_POSITIVE_P(num);
13527 }
13528 return RB_TEST(rb_num_compare_with_zero(num, mid));
13529}
13530static inline int
13531rb_num_negative_int_p(VALUE num)
13532{
13533 const ID mid = '<';
13534 if (RB_FIXNUM_P(num)) {
13536 return FIXNUM_NEGATIVE_P(num);
13537 }
13538 else if (RB_TYPE_P(num, RUBY_T_BIGNUM)) {
13540 return BIGNUM_NEGATIVE_P(num);
13541 }
13542 return RB_TEST(rb_num_compare_with_zero(num, mid));
13543}
13544static inline double
13545rb_float_flonum_value(VALUE v)
13546{
13547 if (v != (VALUE)0x8000000000000002) {
13548 union {
13549 double d;
13550 VALUE v;
13551 } t;
13552 VALUE b63 = (v >> 63);
13553 t.v = RUBY_BIT_ROTR((2 - b63) | (v & ~(VALUE)0x03), 3);
13554 return t.d;
13555 }
13556 return 0.0;
13557}
13558static inline double
13559rb_float_noflonum_value(VALUE v)
13560{
13561 return ((struct RFloat *)(v))->float_value;
13562}
13563static inline double
13564rb_float_value_inline(VALUE v)
13565{
13566 if (RB_FLONUM_P(v)) {
13567 return rb_float_flonum_value(v);
13568 }
13569 return rb_float_noflonum_value(v);
13570}
13571static inline VALUE
13572rb_float_new_inline(double d)
13573{
13574 union {
13575 double d;
13576 VALUE v;
13577 } t;
13578 int bits;
13579 t.d = d;
13580 bits = (int)((VALUE)(t.v >> 60) & 0x7);
13581 if (t.v != 0x3000000000000000 &&
13582 !((bits-3) & ~0x01)) {
13583 return (RUBY_BIT_ROTL(t.v, 3) & ~(VALUE)0x01) | 0x02;
13584 }
13585 else if (t.v == (VALUE)0) {
13586 return 0x8000000000000002;
13587 }
13588 return rb_float_new_in_heap(d);
13589}
13590int ruby_fill_random_bytes(void *, size_t, int);
13591void rb_gc_mark_global_tbl(void);
13592void rb_gc_update_global_tbl(void);
13593size_t rb_generic_ivar_memsize(VALUE);
13594VALUE rb_search_class_path(VALUE);
13595VALUE rb_attr_delete(VALUE, ID);
13596VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef);
13597void rb_autoload_str(VALUE mod, ID id, VALUE file);
13598VALUE rb_autoload_at_p(VALUE, ID, int);
13599__attribute__((__noreturn__)) VALUE rb_mod_const_missing(VALUE,VALUE);
13600rb_gvar_getter_t *rb_gvar_getter_function_of(ID);
13601rb_gvar_setter_t *rb_gvar_setter_function_of(ID);
13602void rb_gvar_readonly_setter(VALUE v, ID id, VALUE *_);
13603void rb_gvar_ractor_local(const char *name);
13604static inline _Bool ROBJ_TRANSIENT_P(VALUE obj);
13605static inline void ROBJ_TRANSIENT_SET(VALUE obj);
13606static inline void ROBJ_TRANSIENT_UNSET(VALUE obj);
13607
13608
13609void rb_mark_generic_ivar(VALUE);
13610void rb_mv_generic_ivar(VALUE src, VALUE dst);
13611VALUE rb_const_missing(VALUE klass, VALUE name);
13612int rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
13613void rb_iv_tbl_copy(VALUE dst, VALUE src);
13614void rb_deprecate_constant(VALUE mod, const char *name);
13615
13616
13617
13618
13619VALUE rb_gvar_get(ID);
13620VALUE rb_gvar_set(ID, VALUE);
13621VALUE rb_gvar_defined(ID);
13622void rb_const_warn_if_deprecated(const rb_const_entry_t *, VALUE, ID);
13623void rb_init_iv_list(VALUE obj);
13624
13625
13626static inline _Bool
13627ROBJ_TRANSIENT_P(VALUE obj)
13628{
13629 return RB_FL_TEST_RAW(obj, ((VALUE)RUBY_FL_USER13));
13630}
13631static inline void
13632ROBJ_TRANSIENT_SET(VALUE obj)
13633{
13634 RB_FL_SET_RAW(obj, ((VALUE)RUBY_FL_USER13));
13635}
13636static inline void
13637ROBJ_TRANSIENT_UNSET(VALUE obj)
13638{
13639 RB_FL_UNSET_RAW(obj, ((VALUE)RUBY_FL_USER13));
13640}
13641struct gen_ivtbl {
13642 uint32_t numiv;
13643 VALUE ivptr[];
13644};
13645int rb_ivar_generic_ivtbl_lookup(VALUE obj, struct gen_ivtbl **);
13646VALUE rb_ivar_generic_lookup_with_index(VALUE obj, ID id, uint32_t index);
13647enum ruby_vminsn_type {
13648 YARVINSN_nop,
13649 YARVINSN_getlocal,
13650 YARVINSN_setlocal,
13651 YARVINSN_getblockparam,
13652 YARVINSN_setblockparam,
13653 YARVINSN_getblockparamproxy,
13654 YARVINSN_getspecial,
13655 YARVINSN_setspecial,
13656 YARVINSN_getinstancevariable,
13657 YARVINSN_setinstancevariable,
13658 YARVINSN_getclassvariable,
13659 YARVINSN_setclassvariable,
13660 YARVINSN_getconstant,
13661 YARVINSN_setconstant,
13662 YARVINSN_getglobal,
13663 YARVINSN_setglobal,
13664 YARVINSN_putnil,
13665 YARVINSN_putself,
13666 YARVINSN_putobject,
13667 YARVINSN_putspecialobject,
13668 YARVINSN_putstring,
13669 YARVINSN_concatstrings,
13670 YARVINSN_tostring,
13671 YARVINSN_toregexp,
13672 YARVINSN_intern,
13673 YARVINSN_newarray,
13674 YARVINSN_newarraykwsplat,
13675 YARVINSN_duparray,
13676 YARVINSN_duphash,
13677 YARVINSN_expandarray,
13678 YARVINSN_concatarray,
13679 YARVINSN_splatarray,
13680 YARVINSN_newhash,
13681 YARVINSN_newrange,
13682 YARVINSN_pop,
13683 YARVINSN_dup,
13684 YARVINSN_dupn,
13685 YARVINSN_swap,
13686 YARVINSN_reverse,
13687 YARVINSN_topn,
13688 YARVINSN_setn,
13689 YARVINSN_adjuststack,
13690 YARVINSN_defined,
13691 YARVINSN_checkmatch,
13692 YARVINSN_checkkeyword,
13693 YARVINSN_checktype,
13694 YARVINSN_defineclass,
13695 YARVINSN_definemethod,
13696 YARVINSN_definesmethod,
13697 YARVINSN_send,
13698 YARVINSN_opt_send_without_block,
13699 YARVINSN_opt_str_freeze,
13700 YARVINSN_opt_nil_p,
13701 YARVINSN_opt_str_uminus,
13702 YARVINSN_opt_newarray_max,
13703 YARVINSN_opt_newarray_min,
13704 YARVINSN_invokesuper,
13705 YARVINSN_invokeblock,
13706 YARVINSN_leave,
13707 YARVINSN_throw,
13708 YARVINSN_jump,
13709 YARVINSN_branchif,
13710 YARVINSN_branchunless,
13711 YARVINSN_branchnil,
13712 YARVINSN_opt_getinlinecache,
13713 YARVINSN_opt_setinlinecache,
13714 YARVINSN_once,
13715 YARVINSN_opt_case_dispatch,
13716 YARVINSN_opt_plus,
13717 YARVINSN_opt_minus,
13718 YARVINSN_opt_mult,
13719 YARVINSN_opt_div,
13720 YARVINSN_opt_mod,
13721 YARVINSN_opt_eq,
13722 YARVINSN_opt_neq,
13723 YARVINSN_opt_lt,
13724 YARVINSN_opt_le,
13725 YARVINSN_opt_gt,
13726 YARVINSN_opt_ge,
13727 YARVINSN_opt_ltlt,
13728 YARVINSN_opt_and,
13729 YARVINSN_opt_or,
13730 YARVINSN_opt_aref,
13731 YARVINSN_opt_aset,
13732 YARVINSN_opt_aset_with,
13733 YARVINSN_opt_aref_with,
13734 YARVINSN_opt_length,
13735 YARVINSN_opt_size,
13736 YARVINSN_opt_empty_p,
13737 YARVINSN_opt_succ,
13738 YARVINSN_opt_not,
13739 YARVINSN_opt_regexpmatch2,
13740 YARVINSN_invokebuiltin,
13741 YARVINSN_opt_invokebuiltin_delegate,
13742 YARVINSN_opt_invokebuiltin_delegate_leave,
13743 YARVINSN_getlocal_WC_0,
13744 YARVINSN_getlocal_WC_1,
13745 YARVINSN_setlocal_WC_0,
13746 YARVINSN_setlocal_WC_1,
13747 YARVINSN_putobject_INT2FIX_0_,
13748 YARVINSN_putobject_INT2FIX_1_,
13749 YARVINSN_trace_nop,
13750 YARVINSN_trace_getlocal,
13751 YARVINSN_trace_setlocal,
13752 YARVINSN_trace_getblockparam,
13753 YARVINSN_trace_setblockparam,
13754 YARVINSN_trace_getblockparamproxy,
13755 YARVINSN_trace_getspecial,
13756 YARVINSN_trace_setspecial,
13757 YARVINSN_trace_getinstancevariable,
13758 YARVINSN_trace_setinstancevariable,
13759 YARVINSN_trace_getclassvariable,
13760 YARVINSN_trace_setclassvariable,
13761 YARVINSN_trace_getconstant,
13762 YARVINSN_trace_setconstant,
13763 YARVINSN_trace_getglobal,
13764 YARVINSN_trace_setglobal,
13765 YARVINSN_trace_putnil,
13766 YARVINSN_trace_putself,
13767 YARVINSN_trace_putobject,
13768 YARVINSN_trace_putspecialobject,
13769 YARVINSN_trace_putstring,
13770 YARVINSN_trace_concatstrings,
13771 YARVINSN_trace_tostring,
13772 YARVINSN_trace_toregexp,
13773 YARVINSN_trace_intern,
13774 YARVINSN_trace_newarray,
13775 YARVINSN_trace_newarraykwsplat,
13776 YARVINSN_trace_duparray,
13777 YARVINSN_trace_duphash,
13778 YARVINSN_trace_expandarray,
13779 YARVINSN_trace_concatarray,
13780 YARVINSN_trace_splatarray,
13781 YARVINSN_trace_newhash,
13782 YARVINSN_trace_newrange,
13783 YARVINSN_trace_pop,
13784 YARVINSN_trace_dup,
13785 YARVINSN_trace_dupn,
13786 YARVINSN_trace_swap,
13787 YARVINSN_trace_reverse,
13788 YARVINSN_trace_topn,
13789 YARVINSN_trace_setn,
13790 YARVINSN_trace_adjuststack,
13791 YARVINSN_trace_defined,
13792 YARVINSN_trace_checkmatch,
13793 YARVINSN_trace_checkkeyword,
13794 YARVINSN_trace_checktype,
13795 YARVINSN_trace_defineclass,
13796 YARVINSN_trace_definemethod,
13797 YARVINSN_trace_definesmethod,
13798 YARVINSN_trace_send,
13799 YARVINSN_trace_opt_send_without_block,
13800 YARVINSN_trace_opt_str_freeze,
13801 YARVINSN_trace_opt_nil_p,
13802 YARVINSN_trace_opt_str_uminus,
13803 YARVINSN_trace_opt_newarray_max,
13804 YARVINSN_trace_opt_newarray_min,
13805 YARVINSN_trace_invokesuper,
13806 YARVINSN_trace_invokeblock,
13807 YARVINSN_trace_leave,
13808 YARVINSN_trace_throw,
13809 YARVINSN_trace_jump,
13810 YARVINSN_trace_branchif,
13811 YARVINSN_trace_branchunless,
13812 YARVINSN_trace_branchnil,
13813 YARVINSN_trace_opt_getinlinecache,
13814 YARVINSN_trace_opt_setinlinecache,
13815 YARVINSN_trace_once,
13816 YARVINSN_trace_opt_case_dispatch,
13817 YARVINSN_trace_opt_plus,
13818 YARVINSN_trace_opt_minus,
13819 YARVINSN_trace_opt_mult,
13820 YARVINSN_trace_opt_div,
13821 YARVINSN_trace_opt_mod,
13822 YARVINSN_trace_opt_eq,
13823 YARVINSN_trace_opt_neq,
13824 YARVINSN_trace_opt_lt,
13825 YARVINSN_trace_opt_le,
13826 YARVINSN_trace_opt_gt,
13827 YARVINSN_trace_opt_ge,
13828 YARVINSN_trace_opt_ltlt,
13829 YARVINSN_trace_opt_and,
13830 YARVINSN_trace_opt_or,
13831 YARVINSN_trace_opt_aref,
13832 YARVINSN_trace_opt_aset,
13833 YARVINSN_trace_opt_aset_with,
13834 YARVINSN_trace_opt_aref_with,
13835 YARVINSN_trace_opt_length,
13836 YARVINSN_trace_opt_size,
13837 YARVINSN_trace_opt_empty_p,
13838 YARVINSN_trace_opt_succ,
13839 YARVINSN_trace_opt_not,
13840 YARVINSN_trace_opt_regexpmatch2,
13841 YARVINSN_trace_invokebuiltin,
13842 YARVINSN_trace_opt_invokebuiltin_delegate,
13843 YARVINSN_trace_opt_invokebuiltin_delegate_leave,
13844 YARVINSN_trace_getlocal_WC_0,
13845 YARVINSN_trace_getlocal_WC_1,
13846 YARVINSN_trace_setlocal_WC_0,
13847 YARVINSN_trace_setlocal_WC_1,
13848 YARVINSN_trace_putobject_INT2FIX_0_,
13849 YARVINSN_trace_putobject_INT2FIX_1_,
13850 VM_INSTRUCTION_SIZE
13851};
13852extern rb_method_definition_t *rb_method_definition_create(rb_method_type_t type, ID mid);
13853extern void rb_method_definition_set(const rb_method_entry_t *me, rb_method_definition_t *def, void *opts);
13854extern int rb_method_definition_eq(const rb_method_definition_t *d1, const rb_method_definition_t *d2);
13855extern VALUE rb_make_no_method_exception(VALUE exc, VALUE format, VALUE obj,
13856 int argc, const VALUE *argv, int priv);
13857static rb_control_frame_t *vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
13858static VALUE
13859ruby_vm_special_exception_copy(VALUE exc)
13860{
13861 VALUE e = rb_obj_alloc(rb_class_real(RBASIC_CLASS(exc)));
13862 rb_obj_copy_ivar(e, exc);
13863 return e;
13864}
13865__attribute__((__noreturn__)) static void ec_stack_overflow(rb_execution_context_t *ec, int);
13866static void
13867ec_stack_overflow(rb_execution_context_t *ec, int setup)
13868{
13869 VALUE mesg = rb_ec_vm_ptr(ec)->special_exceptions[ruby_error_sysstack];
13870 ec->raised_flag = RAISED_STACKOVERFLOW;
13871 if (setup) {
13872 VALUE at = rb_ec_backtrace_object(ec);
13873 mesg = ruby_vm_special_exception_copy(mesg);
13874 rb_ivar_set(mesg, idBt, at);
13875 rb_ivar_set(mesg, idBt_locations, at);
13876 }
13877 ec->errinfo = mesg;
13878 rb_ec_tag_jump(ec, RUBY_TAG_RAISE);
13879}
13880__attribute__((__noreturn__)) static void vm_stackoverflow(void);
13881__attribute__((__noinline__)) static __attribute__((__cold__)) void vm_stackoverflow(void);
13882static void
13883vm_stackoverflow(void)
13884{
13885 ec_stack_overflow(rb_current_execution_context(1), 1);
13886}
13887__attribute__((__noreturn__)) static void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit);
13888static void
13889rb_ec_stack_overflow(rb_execution_context_t *ec, int crit)
13890{
13891 if (rb_during_gc()) {
13892 rb_bug("system stack overflow during GC. Faulty native extension?");
13893 }
13894 if (crit) {
13895 ec->raised_flag = RAISED_STACKOVERFLOW;
13896 ec->errinfo = rb_ec_vm_ptr(ec)->special_exceptions[ruby_error_stackfatal];
13897 rb_ec_tag_jump(ec, RUBY_TAG_RAISE);
13898 }
13899 ec_stack_overflow(ec, 1);
13900}
13901__extension__ _Static_assert((-2) == -2, "VM_ENV_DATA_INDEX_ME_CREF" ": " "VM_ENV_DATA_INDEX_ME_CREF == -2");
13902__extension__ _Static_assert((-1) == -1, "VM_ENV_DATA_INDEX_SPECVAL" ": " "VM_ENV_DATA_INDEX_SPECVAL == -1");
13903__extension__ _Static_assert(( 0) == -0, "VM_ENV_DATA_INDEX_FLAGS" ": " "VM_ENV_DATA_INDEX_FLAGS == -0");
13904static void
13905vm_push_frame(rb_execution_context_t *ec,
13906 const rb_iseq_t *iseq,
13907 VALUE type,
13908 VALUE self,
13909 VALUE specval,
13910 VALUE cref_or_me,
13911 const VALUE *pc,
13912 VALUE *sp,
13913 int local_size,
13914 int stack_max)
13915{
13916 rb_control_frame_t *const cfp = ((ec->cfp)-1);
13917 ;
13918 ((void)0);
13919 do { __extension__ _Static_assert(sizeof(*(sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*(sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*(cfp)) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*(cfp)) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&(sp)[(local_size + stack_max)]; if ((__builtin_expect(!!((cfp) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
13920 ;
13921 for (int i=0; i < local_size; i++) {
13922 *sp++ = ((VALUE)RUBY_Qnil);
13923 }
13924 *sp++ = cref_or_me;
13925 *sp++ = specval ;
13926 *sp++ = type;
13927 *cfp = (const struct rb_control_frame_struct) {
13928 .pc = pc,
13929 .sp = sp,
13930 .iseq = iseq,
13931 .self = self,
13932 .ep = sp - 1,
13933 .block_code = ((void *)0),
13934 .__bp__ = sp,
13935 };
13936 ec->cfp = cfp;
13937 if (0 == 2) {
13938 rb_vmdebug_stack_dump_raw(rb_current_execution_context(1), rb_current_execution_context(1)->cfp);
13939 }
13940 ;
13941}
13942static inline int
13943vm_pop_frame(rb_execution_context_t *ec, rb_control_frame_t *cfp, const VALUE *ep)
13944{
13945 VALUE flags = ep[( 0)];
13946 if ((((0) > 0) ? (0) : 0) >= 4) rb_gc_verify_internal_consistency();
13947 if (0 == 2) rb_vmdebug_stack_dump_raw(rb_current_execution_context(1), rb_current_execution_context(1)->cfp);
13948 rb_vm_check_ints(ec);
13949 ec->cfp = ((cfp)+1);
13950 return flags & VM_FRAME_FLAG_FINISH;
13951}
13952static void
13953rb_vm_pop_frame(rb_execution_context_t *ec)
13954{
13955 vm_pop_frame(ec, ec->cfp, ec->cfp->ep);
13956}
13957static inline VALUE
13958rb_arity_error_new(int argc, int min, int max)
13959{
13960 VALUE err_mess = 0;
13961 if (min == max) {
13962 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d)", argc, min);
13963 }
13964 else if (max == (-1)) {
13965 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d+)", argc, min);
13966 }
13967 else {
13968 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d..%d)", argc, min, max);
13969 }
13970 return rb_exc_new_str(rb_eArgError, err_mess);
13971}
13972static void
13973rb_error_arity(int argc, int min, int max)
13974{
13975 rb_exc_raise(rb_arity_error_new(argc, min, max));
13976}
13977__attribute__((__noinline__)) static void vm_env_write_slowpath(const VALUE *ep, int index, VALUE v);
13978static void
13979vm_env_write_slowpath(const VALUE *ep, int index, VALUE v)
13980{
13981 rb_gc_writebarrier_remember(VM_ENV_ENVVAL(ep));
13982 VM_FORCE_WRITE(&ep[index], v);
13983 VM_ENV_FLAGS_UNSET(ep, VM_ENV_FLAG_WB_REQUIRED);
13984 ((void)0);
13985}
13986static inline void
13987vm_env_write(const VALUE *ep, int index, VALUE v)
13988{
13989 VALUE flags = ep[( 0)];
13990 if ((__builtin_expect(!!((flags & VM_ENV_FLAG_WB_REQUIRED) == 0), 1))) {
13991 VM_STACK_ENV_WRITE(ep, index, v);
13992 }
13993 else {
13994 vm_env_write_slowpath(ep, index, v);
13995 }
13996}
13997static VALUE
13998rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler)
13999{
14000 if (block_handler == 0) {
14001 return ((VALUE)RUBY_Qnil);
14002 }
14003 else {
14004 switch (vm_block_handler_type(block_handler)) {
14005 case block_handler_type_iseq:
14006 case block_handler_type_ifunc:
14007 return rb_vm_make_proc(ec, VM_BH_TO_CAPT_BLOCK(block_handler), rb_cProc);
14008 case block_handler_type_symbol:
14009 return rb_sym_to_proc(VM_BH_TO_SYMBOL(block_handler));
14010 case block_handler_type_proc:
14011 return VM_BH_TO_PROC(block_handler);
14012 default:
14013 __builtin_unreachable();
14014 }
14015 }
14016}
14017static inline struct vm_svar *
14018lep_svar(const rb_execution_context_t *ec, const VALUE *lep)
14019{
14020 VALUE svar;
14021 if (lep && (ec == ((void *)0) || ec->root_lep != lep)) {
14022 svar = lep[(-2)];
14023 }
14024 else {
14025 svar = ec->root_svar;
14026 }
14027 ((void)0);
14028 return (struct vm_svar *)svar;
14029}
14030static inline void
14031lep_svar_write(const rb_execution_context_t *ec, const VALUE *lep, const struct vm_svar *svar)
14032{
14033 ((void)0);
14034 if (lep && (ec == ((void *)0) || ec->root_lep != lep)) {
14035 vm_env_write(lep, (-2), (VALUE)svar);
14036 }
14037 else {
14038 rb_obj_write((VALUE)(rb_ec_thread_ptr(ec)->self), __extension__({
14039;
14040; __typeof__((VALUE *)(&ec->root_svar)) unaligned_member_access_result = ((VALUE *)(&ec->root_svar));
14041; unaligned_member_access_result; }), (VALUE)(svar), "./vm_insnhelper.c", 541);
14042 }
14043}
14044static VALUE
14045lep_svar_get(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key)
14046{
14047 const struct vm_svar *svar = lep_svar(ec, lep);
14048 if ((VALUE)svar == ((VALUE)RUBY_Qfalse) || imemo_type((VALUE)svar) != imemo_svar) return ((VALUE)RUBY_Qnil);
14049 switch (key) {
14050 case VM_SVAR_LASTLINE:
14051 return svar->lastline;
14052 case VM_SVAR_BACKREF:
14053 return svar->backref;
14054 default: {
14055 const VALUE ary = svar->others;
14056 if (RB_NIL_P(ary)) {
14057 return ((VALUE)RUBY_Qnil);
14058 }
14059 else {
14060 return rb_ary_entry(ary, key - VM_SVAR_EXTRA_START);
14061 }
14062 }
14063 }
14064}
14065static struct vm_svar *
14066svar_new(VALUE obj)
14067{
14068 return (struct vm_svar *)rb_imemo_new(imemo_svar, ((VALUE)RUBY_Qnil), ((VALUE)RUBY_Qnil), ((VALUE)RUBY_Qnil), obj);
14069}
14070static void
14071lep_svar_set(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, VALUE val)
14072{
14073 struct vm_svar *svar = lep_svar(ec, lep);
14074 if ((VALUE)svar == ((VALUE)RUBY_Qfalse) || imemo_type((VALUE)svar) != imemo_svar) {
14075 lep_svar_write(ec, lep, svar = svar_new((VALUE)svar));
14076 }
14077 switch (key) {
14078 case VM_SVAR_LASTLINE:
14079 rb_obj_write((VALUE)(svar), __extension__({
14080;
14081; __typeof__((VALUE *)(&svar->lastline)) unaligned_member_access_result = ((VALUE *)(&svar->lastline));
14082; unaligned_member_access_result; }), (VALUE)(val), "./vm_insnhelper.c", 587);
14083 return;
14084 case VM_SVAR_BACKREF:
14085 rb_obj_write((VALUE)(svar), __extension__({
14086;
14087; __typeof__((VALUE *)(&svar->backref)) unaligned_member_access_result = ((VALUE *)(&svar->backref));
14088; unaligned_member_access_result; }), (VALUE)(val), "./vm_insnhelper.c", 590);
14089 return;
14090 default: {
14091 VALUE ary = svar->others;
14092 if (RB_NIL_P(ary)) {
14093 rb_obj_write((VALUE)(svar), __extension__({
14094 ;
14095 ; __typeof__((VALUE *)(&svar->others)) unaligned_member_access_result = ((VALUE *)(&svar->others));
14096 ; unaligned_member_access_result; }), (VALUE)(ary = rb_ary_new()), "./vm_insnhelper.c", 596);
14097 }
14098 rb_ary_store(ary, key - VM_SVAR_EXTRA_START, val);
14099 }
14100 }
14101}
14102static inline VALUE
14103vm_getspecial(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, rb_num_t type)
14104{
14105 VALUE val;
14106 if (type == 0) {
14107 val = lep_svar_get(ec, lep, key);
14108 }
14109 else {
14110 VALUE backref = lep_svar_get(ec, lep, VM_SVAR_BACKREF);
14111 if (type & 0x01) {
14112 switch (type >> 1) {
14113 case '&':
14114 val = rb_reg_last_match(backref);
14115 break;
14116 case '`':
14117 val = rb_reg_match_pre(backref);
14118 break;
14119 case '\'':
14120 val = rb_reg_match_post(backref);
14121 break;
14122 case '+':
14123 val = rb_reg_match_last(backref);
14124 break;
14125 default:
14126 rb_bug("unexpected back-ref");
14127 }
14128 }
14129 else {
14130 val = rb_reg_nth_match((int)(type >> 1), backref);
14131 }
14132 }
14133 return val;
14134}
14135__attribute__((__pure__)) static rb_callable_method_entry_t *check_method_entry(VALUE obj, int can_be_svar);
14137check_method_entry(VALUE obj, int can_be_svar)
14138{
14139 if (obj == ((VALUE)RUBY_Qfalse)) return ((void *)0);
14140 switch (imemo_type(obj)) {
14141 case imemo_ment:
14142 return (rb_callable_method_entry_t *)obj;
14143 case imemo_cref:
14144 return ((void *)0);
14145 case imemo_svar:
14146 if (can_be_svar) {
14147 return check_method_entry(((struct vm_svar *)obj)->cref_or_me, 0);
14148 }
14149 default:
14150 return ((void *)0);
14151 }
14152}
14153static const rb_callable_method_entry_t *
14154rb_vm_frame_method_entry(const rb_control_frame_t *cfp)
14155{
14156 const VALUE *ep = cfp->ep;
14158 while (!VM_ENV_LOCAL_P(ep)) {
14159 if ((me = check_method_entry(ep[(-2)], 0)) != ((void *)0)) return me;
14160 ep = VM_ENV_PREV_EP(ep);
14161 }
14162 return check_method_entry(ep[(-2)], 1);
14163}
14164static rb_iseq_t *
14165method_entry_iseqptr(const rb_callable_method_entry_t *me)
14166{
14167 switch (me->def->type) {
14168 case VM_METHOD_TYPE_ISEQ:
14169 return me->def->body.iseq.iseqptr;
14170 default:
14171 return ((void *)0);
14172 }
14173}
14174static rb_cref_t *
14175method_entry_cref(const rb_callable_method_entry_t *me)
14176{
14177 switch (me->def->type) {
14178 case VM_METHOD_TYPE_ISEQ:
14179 return me->def->body.iseq.cref;
14180 default:
14181 return ((void *)0);
14182 }
14183}
14184__attribute__((__pure__)) static rb_cref_t *check_cref(VALUE, int);
14185static rb_cref_t *
14186check_cref(VALUE obj, int can_be_svar)
14187{
14188 if (obj == ((VALUE)RUBY_Qfalse)) return ((void *)0);
14189 switch (imemo_type(obj)) {
14190 case imemo_ment:
14191 return method_entry_cref((rb_callable_method_entry_t *)obj);
14192 case imemo_cref:
14193 return (rb_cref_t *)obj;
14194 case imemo_svar:
14195 if (can_be_svar) {
14196 return check_cref(((struct vm_svar *)obj)->cref_or_me, 0);
14197 }
14198 default:
14199 return ((void *)0);
14200 }
14201}
14202static inline rb_cref_t *
14203vm_env_cref(const VALUE *ep)
14204{
14205 rb_cref_t *cref;
14206 while (!VM_ENV_LOCAL_P(ep)) {
14207 if ((cref = check_cref(ep[(-2)], 0)) != ((void *)0)) return cref;
14208 ep = VM_ENV_PREV_EP(ep);
14209 }
14210 return check_cref(ep[(-2)], 1);
14211}
14212static int
14213is_cref(const VALUE v, int can_be_svar)
14214{
14215 if (RB_TYPE_P(v, RUBY_T_IMEMO)) {
14216 switch (imemo_type(v)) {
14217 case imemo_cref:
14218 return 1;
14219 case imemo_svar:
14220 if (can_be_svar) return is_cref(((struct vm_svar *)v)->cref_or_me, 0);
14221 default:
14222 break;
14223 }
14224 }
14225 return 0;
14226}
14227static int
14228vm_env_cref_by_cref(const VALUE *ep)
14229{
14230 while (!VM_ENV_LOCAL_P(ep)) {
14231 if (is_cref(ep[(-2)], 0)) return 1;
14232 ep = VM_ENV_PREV_EP(ep);
14233 }
14234 return is_cref(ep[(-2)], 1);
14235}
14236static rb_cref_t *
14237cref_replace_with_duplicated_cref_each_frame(const VALUE *vptr, int can_be_svar, VALUE parent)
14238{
14239 const VALUE v = *vptr;
14240 rb_cref_t *cref, *new_cref;
14241 if (RB_TYPE_P(v, RUBY_T_IMEMO)) {
14242 switch (imemo_type(v)) {
14243 case imemo_cref:
14244 cref = (rb_cref_t *)v;
14245 new_cref = vm_cref_dup(cref);
14246 if (parent) {
14247 rb_obj_write((VALUE)(parent), __extension__({
14248 ;
14249 ; __typeof__((VALUE *)(vptr)) unaligned_member_access_result = ((VALUE *)(vptr));
14250 ; unaligned_member_access_result; }), (VALUE)(new_cref), "./vm_insnhelper.c", 782);
14251 }
14252 else {
14253 VM_FORCE_WRITE(vptr, (VALUE)new_cref);
14254 }
14255 return (rb_cref_t *)new_cref;
14256 case imemo_svar:
14257 if (can_be_svar) {
14258 return cref_replace_with_duplicated_cref_each_frame((const VALUE *)&((struct vm_svar *)v)->cref_or_me, 0, v);
14259 }
14260 case imemo_ment:
14261 rb_bug("cref_replace_with_duplicated_cref_each_frame: unreachable");
14262 default:
14263 break;
14264 }
14265 }
14266 return 0;
14267}
14268static rb_cref_t *
14269vm_cref_replace_with_duplicated_cref(const VALUE *ep)
14270{
14271 if (vm_env_cref_by_cref(ep)) {
14272 rb_cref_t *cref;
14273 VALUE envval;
14274 while (!VM_ENV_LOCAL_P(ep)) {
14275 envval = VM_ENV_ESCAPED_P(ep) ? VM_ENV_ENVVAL(ep) : ((VALUE)RUBY_Qfalse);
14276 if ((cref = cref_replace_with_duplicated_cref_each_frame(&ep[(-2)], 0, envval)) != ((void *)0)) {
14277 return cref;
14278 }
14279 ep = VM_ENV_PREV_EP(ep);
14280 }
14281 envval = VM_ENV_ESCAPED_P(ep) ? VM_ENV_ENVVAL(ep) : ((VALUE)RUBY_Qfalse);
14282 return cref_replace_with_duplicated_cref_each_frame(&ep[(-2)], 1, envval);
14283 }
14284 else {
14285 rb_bug("vm_cref_dup: unreachable");
14286 }
14287}
14288static rb_cref_t *
14289vm_get_cref(const VALUE *ep)
14290{
14291 rb_cref_t *cref = vm_env_cref(ep);
14292 if (cref != ((void *)0)) {
14293 return cref;
14294 }
14295 else {
14296 rb_bug("vm_get_cref: unreachable");
14297 }
14298}
14299static rb_cref_t *
14300vm_ec_cref(const rb_execution_context_t *ec)
14301{
14302 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
14303 if (cfp == ((void *)0)) {
14304 return ((void *)0);
14305 }
14306 return vm_get_cref(cfp->ep);
14307}
14308static const rb_cref_t *
14309vm_get_const_key_cref(const VALUE *ep)
14310{
14311 const rb_cref_t *cref = vm_get_cref(ep);
14312 const rb_cref_t *key_cref = cref;
14313 while (cref) {
14314 if (RB_FL_TEST(CREF_CLASS(cref), ((VALUE)RUBY_FL_SINGLETON)) ||
14315 RB_FL_TEST(CREF_CLASS(cref), ((VALUE)RUBY_FL_USER6))) {
14316 return key_cref;
14317 }
14318 cref = CREF_NEXT(cref);
14319 }
14320 return ((void *)0);
14321}static inline
14322void
14323rb_vm_rewrite_cref(rb_cref_t *cref, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr)
14324{
14325 rb_cref_t *new_cref;
14326 while (cref) {
14327 if (CREF_CLASS(cref) == old_klass) {
14328 new_cref = vm_cref_new_use_prev(new_klass, METHOD_VISI_UNDEF, 0, cref, 0);
14329 *new_cref_ptr = new_cref;
14330 return;
14331 }
14332 new_cref = vm_cref_new_use_prev(CREF_CLASS(cref), METHOD_VISI_UNDEF, 0, cref, 0);
14333 cref = CREF_NEXT(cref);
14334 *new_cref_ptr = new_cref;
14335 new_cref_ptr = (rb_cref_t **)&new_cref->next;
14336 }
14337 *new_cref_ptr = ((void *)0);
14338}
14339static rb_cref_t *
14340vm_cref_push(const rb_execution_context_t *ec, VALUE klass, const VALUE *ep, int pushed_by_eval)
14341{
14342 rb_cref_t *prev_cref = ((void *)0);
14343 if (ep) {
14344 prev_cref = vm_env_cref(ep);
14345 }
14346 else {
14347 rb_control_frame_t *cfp = vm_get_ruby_level_caller_cfp(ec, ec->cfp);
14348 if (cfp) {
14349 prev_cref = vm_env_cref(cfp->ep);
14350 }
14351 }
14352 return vm_cref_new(klass, METHOD_VISI_PUBLIC, 0, prev_cref, pushed_by_eval);
14353}
14354static inline VALUE
14355vm_get_cbase(const VALUE *ep)
14356{
14357 const rb_cref_t *cref = vm_get_cref(ep);
14358 VALUE klass = ((VALUE)RUBY_Qundef);
14359 while (cref) {
14360 if ((klass = CREF_CLASS(cref)) != 0) {
14361 break;
14362 }
14363 cref = CREF_NEXT(cref);
14364 }
14365 return klass;
14366}
14367static inline VALUE
14368vm_get_const_base(const VALUE *ep)
14369{
14370 const rb_cref_t *cref = vm_get_cref(ep);
14371 VALUE klass = ((VALUE)RUBY_Qundef);
14372 while (cref) {
14373 if (!CREF_PUSHED_BY_EVAL(cref) &&
14374 (klass = CREF_CLASS(cref)) != 0) {
14375 break;
14376 }
14377 cref = CREF_NEXT(cref);
14378 }
14379 return klass;
14380}
14381static inline void
14382vm_check_if_namespace(VALUE klass)
14383{
14384 if (!RB_TYPE_P(klass, RUBY_T_CLASS) && !RB_TYPE_P(klass, RUBY_T_MODULE)) {
14385 rb_raise(rb_eTypeError, "%+""l""i" "\v"" is not a class/module", klass);
14386 }
14387}
14388static inline void
14389vm_ensure_not_refinement_module(VALUE self)
14390{
14391 if (RB_TYPE_P(self, RUBY_T_MODULE) && RB_FL_TEST(self, RMODULE_IS_REFINEMENT)) {
14392 rb_warn("not defined at the refinement, but at the outer class/module");
14393 }
14394}
14395static inline VALUE
14396vm_get_iclass(rb_control_frame_t *cfp, VALUE klass)
14397{
14398 return klass;
14399}
14400static inline VALUE
14401vm_get_ev_const(rb_execution_context_t *ec, VALUE orig_klass, ID id, _Bool allow_nil, int is_defined)
14402{
14403 void rb_const_warn_if_deprecated(const rb_const_entry_t *ce, VALUE klass, ID id);
14404 VALUE val;
14405 if (orig_klass == ((VALUE)RUBY_Qnil) && allow_nil) {
14406 const rb_cref_t *root_cref = vm_get_cref(ec->cfp->ep);
14407 const rb_cref_t *cref;
14408 VALUE klass = ((VALUE)RUBY_Qnil);
14409 while (root_cref && CREF_PUSHED_BY_EVAL(root_cref)) {
14410 root_cref = CREF_NEXT(root_cref);
14411 }
14412 cref = root_cref;
14413 while (cref && CREF_NEXT(cref)) {
14414 if (CREF_PUSHED_BY_EVAL(cref)) {
14415 klass = ((VALUE)RUBY_Qnil);
14416 }
14417 else {
14418 klass = CREF_CLASS(cref);
14419 }
14420 cref = CREF_NEXT(cref);
14421 if (!RB_NIL_P(klass)) {
14422 VALUE av, am = 0;
14423 rb_const_entry_t *ce;
14424 search_continue:
14425 if ((ce = rb_const_lookup(klass, id))) {
14426 rb_const_warn_if_deprecated(ce, klass, id);
14427 val = ce->value;
14428 if (val == ((VALUE)RUBY_Qundef)) {
14429 if (am == klass) break;
14430 am = klass;
14431 if (is_defined) return 1;
14432 if (rb_autoloading_value(klass, id, &av, ((void *)0))) return av;
14433 rb_autoload_load(klass, id);
14434 goto search_continue;
14435 }
14436 else {
14437 if (is_defined) {
14438 return 1;
14439 }
14440 else {
14441 if ((__builtin_expect(!!(!rb_ractor_main_p()), 0))) {
14442 if (!rb_ractor_shareable_p(val)) {
14443 rb_raise(rb_eRactorIsolationError,
14444 "can not access non-shareable objects in constant %""l""i" "\v""::%s by non-main ractor.", rb_class_path(klass), rb_id2name(id));
14445 }
14446 }
14447 return val;
14448 }
14449 }
14450 }
14451 }
14452 }
14453 if (root_cref && !RB_NIL_P(CREF_CLASS(root_cref))) {
14454 klass = vm_get_iclass(ec->cfp, CREF_CLASS(root_cref));
14455 }
14456 else {
14457 klass = rb_class_of(ec->cfp->self);
14458 }
14459 if (is_defined) {
14460 return rb_const_defined(klass, id);
14461 }
14462 else {
14463 return rb_const_get(klass, id);
14464 }
14465 }
14466 else {
14467 vm_check_if_namespace(orig_klass);
14468 if (is_defined) {
14469 return rb_public_const_defined_from(orig_klass, id);
14470 }
14471 else {
14472 return rb_public_const_get_from(orig_klass, id);
14473 }
14474 }
14475}
14476static inline VALUE
14477vm_get_cvar_base(const rb_cref_t *cref, rb_control_frame_t *cfp, int top_level_raise)
14478{
14479 VALUE klass;
14480 if (!cref) {
14481 rb_bug("vm_get_cvar_base: no cref");
14482 }
14483 while (CREF_NEXT(cref) &&
14484 (RB_NIL_P(CREF_CLASS(cref)) || RB_FL_TEST(CREF_CLASS(cref), ((VALUE)RUBY_FL_SINGLETON)) ||
14485 CREF_PUSHED_BY_EVAL(cref))) {
14486 cref = CREF_NEXT(cref);
14487 }
14488 if (top_level_raise && !CREF_NEXT(cref)) {
14489 rb_raise(rb_eRuntimeError, "class variable access from toplevel");
14490 }
14491 klass = vm_get_iclass(cfp, CREF_CLASS(cref));
14492 if (RB_NIL_P(klass)) {
14493 rb_raise(rb_eTypeError, "no class variables available");
14494 }
14495 return klass;
14496}
14497static VALUE
14498vm_search_const_defined_class(const VALUE cbase, ID id)
14499{
14500 if (rb_const_defined_at(cbase, id)) return cbase;
14501 if (cbase == rb_cObject) {
14502 VALUE tmp = RCLASS_SUPER(cbase);
14503 while (tmp) {
14504 if (rb_const_defined_at(tmp, id)) return tmp;
14505 tmp = RCLASS_SUPER(tmp);
14506 }
14507 }
14508 return 0;
14509}
14510static _Bool
14511iv_index_tbl_lookup(struct st_table *iv_index_tbl, ID id, struct rb_iv_index_tbl_entry **ent)
14512{
14513 int found;
14514 if (iv_index_tbl == ((void *)0)) return 0;
14515 { unsigned int _lev; rb_vm_lock_enter(&_lev, "./vm_insnhelper.c", 1090);;
14516 {
14517 found = rb_st_lookup(iv_index_tbl, (st_data_t)id, (st_data_t *)ent);
14518 }
14519 rb_vm_lock_leave(&_lev, "./vm_insnhelper.c", 1094); };
14520 return found ? 1 : 0;
14521}
14522__attribute__ ((__always_inline__)) static void fill_ivar_cache(const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr, struct rb_iv_index_tbl_entry *ent);
14523static inline void
14524fill_ivar_cache(const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr, struct rb_iv_index_tbl_entry *ent)
14525{
14526 if (!is_attr) {
14527 ic->entry = ent;
14528 (rb_obj_written((VALUE)(iseq), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(ent->class_value), "./vm_insnhelper.c", 1107));
14529 }
14530 else {
14531 vm_cc_attr_index_set(cc, (int)ent->index + 1);
14532 }
14533}
14534__attribute__ ((__always_inline__)) static VALUE vm_getivar(VALUE, ID, const rb_iseq_t *, IVC, const struct rb_callcache *, int);
14535static inline VALUE
14536vm_getivar(VALUE obj, ID id, const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr)
14537{
14538 VALUE val = ((VALUE)RUBY_Qundef);
14539 if (RB_SPECIAL_CONST_P(obj)) {
14540 }
14541 else if ((__builtin_expect(!!(is_attr ? (!!(vm_cc_attr_index(cc) > 0)) : (!!(ic->entry && ic->entry->class_serial == (((struct RClass *)(((struct RBasic *)(obj))->klass))->class_serial)))), 1))) {
14542 uint32_t index = !is_attr ? ic->entry->index : (vm_cc_attr_index(cc) - 1);
14543 ((void)0);
14544 if ((__builtin_expect(!!(RB_BUILTIN_TYPE(obj) == RUBY_T_OBJECT), 1)) &&
14545 (__builtin_expect(!!(index < ROBJECT_NUMIV(obj)), 1))) {
14546 val = ROBJECT_IVPTR(obj)[index];
14547 ((void)0);
14548 }
14549 else if (RB_FL_TEST_RAW(obj, ((VALUE)RUBY_FL_EXIVAR))) {
14550 val = rb_ivar_generic_lookup_with_index(obj, id, index);
14551 }
14552 goto ret;
14553 }
14554 else {
14555 struct rb_iv_index_tbl_entry *ent;
14556 if (RB_BUILTIN_TYPE(obj) == RUBY_T_OBJECT) {
14557 struct st_table *iv_index_tbl = ROBJECT_IV_INDEX_TBL_inline(obj);
14558 if (iv_index_tbl && iv_index_tbl_lookup(iv_index_tbl, id, &ent)) {
14559 fill_ivar_cache(iseq, ic, cc, is_attr, ent);
14560 if (ent->index < ROBJECT_NUMIV(obj)) {
14561 val = ROBJECT_IVPTR(obj)[ent->index];
14562 ((void)0);
14563 }
14564 }
14565 }
14566 else if (RB_FL_TEST_RAW(obj, ((VALUE)RUBY_FL_EXIVAR))) {
14567 struct st_table *iv_index_tbl = ((((struct RClass *)(rb_obj_class(obj)))->ptr)->iv_index_tbl);
14568 if (iv_index_tbl && iv_index_tbl_lookup(iv_index_tbl, id, &ent)) {
14569 fill_ivar_cache(iseq, ic, cc, is_attr, ent);
14570 val = rb_ivar_generic_lookup_with_index(obj, id, ent->index);
14571 }
14572 }
14573 else {
14574 goto general_path;
14575 }
14576 ret:
14577 if ((__builtin_expect(!!(val != ((VALUE)RUBY_Qundef)), 1))) {
14578 return val;
14579 }
14580 else {
14581 return ((VALUE)RUBY_Qnil);
14582 }
14583 }
14584 general_path:
14585 ((void)0);
14586 if (is_attr) {
14587 return rb_attr_get(obj, id);
14588 }
14589 else {
14590 return rb_ivar_get(obj, id);
14591 }
14592}
14593__attribute__ ((__always_inline__)) static VALUE vm_setivar_slowpath(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr);
14594__attribute__((__noinline__)) static VALUE vm_setivar_slowpath_ivar(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic);
14595__attribute__((__noinline__)) static VALUE vm_setivar_slowpath_attr(VALUE obj, ID id, VALUE val, const struct rb_callcache *cc);
14596static VALUE
14597vm_setivar_slowpath(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr)
14598{
14599 do { VALUE frozen_obj = (obj); if ((__builtin_expect(!!(RB_OBJ_FROZEN(frozen_obj)), 0))) { rb_error_frozen_object(frozen_obj); } } while (0);
14600 if (RB_TYPE_P(obj, RUBY_T_OBJECT)) {
14601 struct st_table *iv_index_tbl = ROBJECT_IV_INDEX_TBL_inline(obj);
14602 struct rb_iv_index_tbl_entry *ent;
14603 if (iv_index_tbl_lookup(iv_index_tbl, id, &ent)) {
14604 if (!is_attr) {
14605 ic->entry = ent;
14606 (rb_obj_written((VALUE)(iseq), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(ent->class_value), "./vm_insnhelper.c", 1211));
14607 }
14608 else if (ent->index >= 0x7fffffff) {
14609 rb_raise(rb_eArgError, "too many instance variables");
14610 }
14611 else {
14612 vm_cc_attr_index_set(cc, (int)(ent->index + 1));
14613 }
14614 uint32_t index = ent->index;
14615 if ((__builtin_expect(!!(index >= ROBJECT_NUMIV(obj)), 0))) {
14616 rb_init_iv_list(obj);
14617 }
14618 VALUE *ptr = ROBJECT_IVPTR(obj);
14619 rb_obj_write((VALUE)(obj), __extension__({
14620 ;
14621 ; __typeof__((VALUE *)(&ptr[index])) unaligned_member_access_result = ((VALUE *)(&ptr[index]));
14622 ; unaligned_member_access_result; }), (VALUE)(val), "./vm_insnhelper.c", 1226);
14623 ((void)0);
14624 return val;
14625 }
14626 }
14627 ((void)0);
14628 return rb_ivar_set(obj, id, val);
14629}
14630static VALUE
14631vm_setivar_slowpath_ivar(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic)
14632{
14633 return vm_setivar_slowpath(obj, id, val, iseq, ic, ((void *)0), 0);
14634}
14635static VALUE
14636vm_setivar_slowpath_attr(VALUE obj, ID id, VALUE val, const struct rb_callcache *cc)
14637{
14638 return vm_setivar_slowpath(obj, id, val, ((void *)0), ((void *)0), cc, 1);
14639}
14640static inline VALUE
14641vm_setivar(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr)
14642{
14643 if ((__builtin_expect(!!(RB_TYPE_P(obj, RUBY_T_OBJECT)), 1)) &&
14644 (__builtin_expect(!!(!RB_OBJ_FROZEN_RAW(obj)), 1))) {
14645 ((void)0);
14646 if ((__builtin_expect(!!((!is_attr && (!!(ic->entry && ic->entry->class_serial == (((struct RClass *)(((struct RBasic *)(obj))->klass))->class_serial)))) || ( is_attr && (!!(vm_cc_attr_index(cc) > 0)))), 1))) {
14647 uint32_t index = !is_attr ? ic->entry->index : vm_cc_attr_index(cc)-1;
14648 if ((__builtin_expect(!!(index >= ROBJECT_NUMIV(obj)), 0))) {
14649 rb_init_iv_list(obj);
14650 }
14651 VALUE *ptr = ROBJECT_IVPTR(obj);
14652 rb_obj_write((VALUE)(obj), __extension__({
14653 ;
14654 ; __typeof__((VALUE *)(&ptr[index])) unaligned_member_access_result = ((VALUE *)(&ptr[index]));
14655 ; unaligned_member_access_result; }), (VALUE)(val), "./vm_insnhelper.c", 1267);
14656 ((void)0);
14657 return val;
14658 }
14659 }
14660 else {
14661 ((void)0);
14662 }
14663 if (is_attr) {
14664 return vm_setivar_slowpath_attr(obj, id, val, cc);
14665 }
14666 else {
14667 return vm_setivar_slowpath_ivar(obj, id, val, iseq, ic);
14668 }
14669}
14670static inline VALUE
14671vm_getinstancevariable(const rb_iseq_t *iseq, VALUE obj, ID id, IVC ic)
14672{
14673 return vm_getivar(obj, id, iseq, ic, ((void *)0), 0);
14674}
14675static inline void
14676vm_setinstancevariable(const rb_iseq_t *iseq, VALUE obj, ID id, VALUE val, IVC ic)
14677{
14678 vm_setivar(obj, id, val, iseq, ic, 0, 0);
14679}
14680static VALUE
14681vm_throw_continue(const rb_execution_context_t *ec, VALUE err)
14682{
14683 if (RB_FIXNUM_P(err)) {
14684 ec->tag->state = RB_FIX2INT(err);
14685 }
14686 else if (RB_SYMBOL_P(err)) {
14687 ec->tag->state = RUBY_TAG_THROW;
14688 }
14689 else if (imemo_throw_data_p((VALUE)err)) {
14690 ec->tag->state = THROW_DATA_STATE((struct vm_throw_data *)err);
14691 }
14692 else {
14693 ec->tag->state = RUBY_TAG_RAISE;
14694 }
14695 return err;
14696}
14697static VALUE
14698vm_throw_start(const rb_execution_context_t *ec, rb_control_frame_t *const reg_cfp, enum ruby_tag_type state,
14699 const int flag, const VALUE throwobj)
14700{
14701 const rb_control_frame_t *escape_cfp = ((void *)0);
14702 const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec);
14703 if (flag != 0) {
14704 }
14705 else if (state == RUBY_TAG_BREAK) {
14706 int is_orphan = 1;
14707 const VALUE *ep = ((((reg_cfp)->ep)));
14708 const rb_iseq_t *base_iseq = ((((reg_cfp)))->iseq);
14709 escape_cfp = reg_cfp;
14710 while (base_iseq->body->type != ISEQ_TYPE_BLOCK) {
14711 if (escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) {
14712 escape_cfp = ((escape_cfp)+1);
14713 ep = escape_cfp->ep;
14714 base_iseq = escape_cfp->iseq;
14715 }
14716 else {
14717 ep = VM_ENV_PREV_EP(ep);
14718 base_iseq = base_iseq->body->parent_iseq;
14719 escape_cfp = rb_vm_search_cf_from_ep(ec, escape_cfp, ep);
14720 ((void)0);
14721 }
14722 }
14723 if (VM_FRAME_LAMBDA_P(escape_cfp)) {
14724 is_orphan = 0;
14725 state = RUBY_TAG_RETURN;
14726 }
14727 else {
14728 ep = VM_ENV_PREV_EP(ep);
14729 while (escape_cfp < eocfp) {
14730 if (escape_cfp->ep == ep) {
14731 const rb_iseq_t *const iseq = escape_cfp->iseq;
14732 const VALUE epc = escape_cfp->pc - iseq->body->iseq_encoded;
14733 const struct iseq_catch_table *const ct = iseq->body->catch_table;
14734 unsigned int i;
14735 if (!ct) break;
14736 for (i=0; i < ct->size; i++) {
14737 const struct iseq_catch_table_entry *const entry =
14738 __extension__({
14739 ;
14740 ; __typeof__(&(ct)->entries[i]) unaligned_member_access_result = (&(ct)->entries[i]);
14741 ; unaligned_member_access_result; });
14742 if (entry->type == CATCH_TYPE_BREAK &&
14743 entry->iseq == base_iseq &&
14744 entry->start < epc && entry->end >= epc) {
14745 if (entry->cont == epc) {
14746 is_orphan = 0;
14747 }
14748 break;
14749 }
14750 }
14751 break;
14752 }
14753 escape_cfp = ((escape_cfp)+1);
14754 }
14755 }
14756 if (is_orphan) {
14757 rb_vm_localjump_error("break from proc-closure", throwobj, RUBY_TAG_BREAK);
14758 }
14759 }
14760 else if (state == RUBY_TAG_RETRY) {
14761 const VALUE *ep = VM_ENV_PREV_EP(((((reg_cfp)->ep))));
14762 escape_cfp = rb_vm_search_cf_from_ep(ec, reg_cfp, ep);
14763 }
14764 else if (state == RUBY_TAG_RETURN) {
14765 const VALUE *current_ep = ((((reg_cfp)->ep)));
14766 const VALUE *target_lep = VM_EP_LEP(current_ep);
14767 int in_class_frame = 0;
14768 int toplevel = 1;
14769 escape_cfp = reg_cfp;
14770 while (escape_cfp < eocfp) {
14771 const VALUE *lep = VM_CF_LEP(escape_cfp);
14772 if (!target_lep) {
14773 target_lep = lep;
14774 }
14775 if (lep == target_lep &&
14776 VM_FRAME_RUBYFRAME_P(escape_cfp) &&
14777 escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) {
14778 in_class_frame = 1;
14779 target_lep = 0;
14780 }
14781 if (lep == target_lep) {
14782 if (VM_FRAME_LAMBDA_P(escape_cfp)) {
14783 toplevel = 0;
14784 if (in_class_frame) {
14785 goto valid_return;
14786 }
14787 else {
14788 const VALUE *tep = current_ep;
14789 while (target_lep != tep) {
14790 if (escape_cfp->ep == tep) {
14791 goto valid_return;
14792 }
14793 tep = VM_ENV_PREV_EP(tep);
14794 }
14795 }
14796 }
14797 else if (VM_FRAME_RUBYFRAME_P(escape_cfp)) {
14798 switch (escape_cfp->iseq->body->type) {
14799 case ISEQ_TYPE_TOP:
14800 case ISEQ_TYPE_MAIN:
14801 if (toplevel) {
14802 if (in_class_frame) goto unexpected_return;
14803 goto valid_return;
14804 }
14805 break;
14806 case ISEQ_TYPE_EVAL:
14807 case ISEQ_TYPE_CLASS:
14808 toplevel = 0;
14809 break;
14810 default:
14811 break;
14812 }
14813 }
14814 }
14815 if (escape_cfp->ep == target_lep && escape_cfp->iseq->body->type == ISEQ_TYPE_METHOD) {
14816 goto valid_return;
14817 }
14818 escape_cfp = ((escape_cfp)+1);
14819 }
14820 unexpected_return:;
14821 rb_vm_localjump_error("unexpected return", throwobj, RUBY_TAG_RETURN);
14822 valid_return:;
14823 }
14824 else {
14825 rb_bug("isns(throw): unsupported throw type");
14826 }
14827 ec->tag->state = state;
14828 return (VALUE)THROW_DATA_NEW(throwobj, escape_cfp, state);
14829}
14830static VALUE
14831vm_throw(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
14832 rb_num_t throw_state, VALUE throwobj)
14833{
14834 const int state = (int)(throw_state & VM_THROW_STATE_MASK);
14835 const int flag = (int)(throw_state & VM_THROW_NO_ESCAPE_FLAG);
14836 if (state != 0) {
14837 return vm_throw_start(ec, reg_cfp, state, flag, throwobj);
14838 }
14839 else {
14840 return vm_throw_continue(ec, throwobj);
14841 }
14842}
14843static inline void
14844vm_expandarray(VALUE *sp, VALUE ary, rb_num_t num, int flag)
14845{
14846 int is_splat = flag & 0x01;
14847 rb_num_t space_size = num + is_splat;
14848 VALUE *base = sp - 1;
14849 const VALUE *ptr;
14850 rb_num_t len;
14851 const VALUE obj = ary;
14852 if (!RB_TYPE_P(ary, RUBY_T_ARRAY) && RB_NIL_P(ary = rb_check_array_type(ary))) {
14853 ary = obj;
14854 ptr = &ary;
14855 len = 1;
14856 }
14857 else {
14858 ptr = rb_array_const_ptr_transient(ary);
14859 len = (rb_num_t)rb_array_len(ary);
14860 }
14861 if (space_size == 0) {
14862 }
14863 else if (flag & 0x02) {
14864 rb_num_t i = 0, j;
14865 if (len < num) {
14866 for (i=0; i<num-len; i++) {
14867 *base++ = ((VALUE)RUBY_Qnil);
14868 }
14869 }
14870 for (j=0; i<num; i++, j++) {
14871 VALUE v = ptr[len - j - 1];
14872 *base++ = v;
14873 }
14874 if (is_splat) {
14875 *base = rb_ary_new_from_values(len - j, ptr);
14876 }
14877 }
14878 else {
14879 rb_num_t i;
14880 VALUE *bptr = &base[space_size - 1];
14881 for (i=0; i<num; i++) {
14882 if (len <= i) {
14883 for (; i<num; i++) {
14884 *bptr-- = ((VALUE)RUBY_Qnil);
14885 }
14886 break;
14887 }
14888 *bptr-- = ptr[i];
14889 }
14890 if (is_splat) {
14891 if (num > len) {
14892 *bptr = rb_ary_new();
14893 }
14894 else {
14895 *bptr = rb_ary_new_from_values(len - num, ptr + num);
14896 }
14897 }
14898 }
14899 (*__extension__ ({ volatile VALUE *rb_gc_guarded_ptr = &(ary); __asm__("" : : "m"(rb_gc_guarded_ptr)); rb_gc_guarded_ptr; }));
14900}
14901static VALUE vm_call_general(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling);
14902static VALUE vm_mtbl_dump(VALUE klass, ID target_mid);
14903static struct rb_class_cc_entries *
14904vm_ccs_create(VALUE klass, const rb_callable_method_entry_t *cme)
14905{
14906 struct rb_class_cc_entries *ccs = ((struct rb_class_cc_entries *)ruby_xmalloc(sizeof(struct rb_class_cc_entries)));
14907 ccs->capa = 0;
14908 ccs->len = 0;
14909 rb_obj_write((VALUE)(klass), __extension__({
14910 ;
14911 ; __typeof__((VALUE *)(&ccs->cme)) unaligned_member_access_result = ((VALUE *)(&ccs->cme));
14912 ; unaligned_member_access_result; }), (VALUE)(cme), "./vm_insnhelper.c", 1564);
14913 (((rb_callable_method_entry_t *)cme)->flags |= ((VALUE)RUBY_FL_USER8));
14914 ccs->entries = ((void *)0);
14915 return ccs;
14916}
14917static void
14918vm_ccs_push(VALUE klass, struct rb_class_cc_entries *ccs, const struct rb_callinfo *ci, const struct rb_callcache *cc)
14919{
14920 if (! vm_cc_markable(cc)) {
14921 return;
14922 }
14923 else if (! vm_ci_markable(ci)) {
14924 return;
14925 }
14926 if ((__builtin_expect(!!(ccs->len == ccs->capa), 0))) {
14927 if (ccs->capa == 0) {
14928 ccs->capa = 1;
14929 ccs->entries = ((struct rb_class_cc_entries_entry *)ruby_xmalloc2((ccs->capa), sizeof(struct rb_class_cc_entries_entry)));
14930 }
14931 else {
14932 ccs->capa *= 2;
14933 ((ccs->entries) = ((struct rb_class_cc_entries_entry *)ruby_xrealloc2((void *)(ccs->entries), (ccs->capa), sizeof(struct rb_class_cc_entries_entry))));
14934 }
14935 }
14936 ((void)0);
14937 const int pos = ccs->len++;
14938 rb_obj_write((VALUE)(klass), __extension__({
14939 ;
14940 ; __typeof__((VALUE *)(&ccs->entries[pos].ci)) unaligned_member_access_result = ((VALUE *)(&ccs->entries[pos].ci));
14941 ; unaligned_member_access_result; }), (VALUE)(ci), "./vm_insnhelper.c", 1593);
14942 rb_obj_write((VALUE)(klass), __extension__({
14943 ;
14944 ; __typeof__((VALUE *)(&ccs->entries[pos].cc)) unaligned_member_access_result = ((VALUE *)(&ccs->entries[pos].cc));
14945 ; unaligned_member_access_result; }), (VALUE)(cc), "./vm_insnhelper.c", 1594);
14946 if (0) {
14947 }
14948}
14949static const struct rb_callcache *
14950vm_search_method_slowpath0(VALUE cd_owner, struct rb_call_data *cd, VALUE klass)
14951{
14952 const struct rb_callcache *cc = rb_vm_search_method_slowpath(cd->ci, klass);
14953 cd->cc = cc;
14954 const struct rb_callcache *empty_cc =
14955 rb_vm_empty_cc();
14956 if (cd_owner && cc != empty_cc) (rb_obj_written((VALUE)(cd_owner), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(cc), "./vm_insnhelper.c", 1770));
14957 ((void)0);
14958 return cc;
14959}
14960static const struct rb_callcache *
14961vm_search_method_fastpath(VALUE cd_owner, struct rb_call_data *cd, VALUE klass)
14962{
14963 const struct rb_callcache *cc = cd->cc;
14964 if ((__builtin_expect(!!(vm_cc_class_check(cc, klass)), 1))) {
14965 const struct rb_callable_method_entry_struct *cme = vm_cc_cme(cc);
14966 if ((__builtin_expect(!!(cme && !((cme)->flags & ((VALUE)RUBY_FL_USER9))), 1))) {
14967 ((void)0);
14968 ((void)0);
14969 ((void)0);
14970 return cc;
14971 }
14972 ((void)0);
14973 }
14974 else {
14975 ((void)0);
14976 }
14977 return vm_search_method_slowpath0(cd_owner, cd, klass);
14978}
14979static const struct rb_callcache *
14980vm_search_method(VALUE cd_owner, struct rb_call_data *cd, VALUE recv)
14981{
14982 VALUE klass = rb_class_of(recv);
14983 ((void)0);
14984 ((void)0);
14985 return vm_search_method_fastpath(cd_owner, cd, klass);
14986}
14987static inline int
14988check_cfunc(const rb_callable_method_entry_t *me, VALUE (*func)())
14989{
14990 if (! me) {
14991 return 0;
14992 }
14993 else {
14994 ((void)0);
14995 ((void)0);
14996 ((void)0);
14997 if (me->def->type != VM_METHOD_TYPE_CFUNC) {
14998 return 0;
14999 }
15000 else {
15001 return me->def->body.cfunc.func == func;
15002 }
15003 }
15004}
15005static inline int
15006vm_method_cfunc_is(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv, VALUE (*func)())
15007{
15008 ((void)0);
15009 const struct rb_callcache *cc = vm_search_method((VALUE)iseq, cd, recv);
15010 return check_cfunc(vm_cc_cme(cc), func);
15011}
15012static inline _Bool
15013FIXNUM_2_P(VALUE a, VALUE b)
15014{
15015 long x = a;
15016 long y = b;
15017 long z = x & y & 1;
15018 return z == 1;
15019}
15020static inline _Bool
15021FLONUM_2_P(VALUE a, VALUE b)
15022{
15023 long x = a;
15024 long y = b;
15025 long z = ((x ^ 2) | (y ^ 2)) & 3;
15026 return !z;
15027}
15028static VALUE
15029opt_equality_specialized(VALUE recv, VALUE obj)
15030{
15031 if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 0))) == 0), 1)))) {
15032 goto compare_by_identity;
15033 }
15034 else if (FLONUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1)))) {
15035 goto compare_by_identity;
15036 }
15037 else if (RB_STATIC_SYM_P(recv) && RB_STATIC_SYM_P(obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 6))) == 0), 1)))) {
15038 goto compare_by_identity;
15039 }
15040 else if (RB_SPECIAL_CONST_P(recv)) {
15041 }
15042 else if (RBASIC_CLASS(recv) == rb_cFloat && RB_FLOAT_TYPE_P(obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1)))) {
15043 double a = rb_float_value_inline(recv);
15044 double b = rb_float_value_inline(obj);
15045 if (a == b) {
15046 return ((VALUE)RUBY_Qtrue);
15047 }
15048 else {
15049 return ((VALUE)RUBY_Qfalse);
15050 }
15051 }
15052 else if (RBASIC_CLASS(recv) == rb_cString && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 2))) == 0), 1)))) {
15053 if (recv == obj) {
15054 return ((VALUE)RUBY_Qtrue);
15055 }
15056 else if (RB_TYPE_P(obj, RUBY_T_STRING)) {
15057 return rb_str_eql_internal(obj, recv);
15058 }
15059 }
15060 return ((VALUE)RUBY_Qundef);
15061 compare_by_identity:
15062 if (recv == obj) {
15063 return ((VALUE)RUBY_Qtrue);
15064 }
15065 else {
15066 return ((VALUE)RUBY_Qfalse);
15067 }
15068}
15069static VALUE
15070opt_equality(const rb_iseq_t *cd_owner, VALUE recv, VALUE obj, CALL_DATA cd)
15071{
15072 ((void)0);
15073 VALUE val = opt_equality_specialized(recv, obj);
15074 if (val != ((VALUE)RUBY_Qundef)) return val;
15075 if (!vm_method_cfunc_is(cd_owner, cd, recv, rb_obj_equal)) {
15076 return ((VALUE)RUBY_Qundef);
15077 }
15078 else {
15079 if (recv == obj) {
15080 return ((VALUE)RUBY_Qtrue);
15081 }
15082 else {
15083 return ((VALUE)RUBY_Qfalse);
15084 }
15085 }
15086}
15087extern VALUE rb_vm_call0(rb_execution_context_t *ec, VALUE, ID, int, const VALUE*, const rb_callable_method_entry_t *, int kw_splat);
15088static VALUE
15089check_match(rb_execution_context_t *ec, VALUE pattern, VALUE target, enum vm_check_match_type type)
15090{
15091 switch (type) {
15092 case VM_CHECKMATCH_TYPE_WHEN:
15093 return pattern;
15094 case VM_CHECKMATCH_TYPE_RESCUE:
15095 if (!rb_obj_is_kind_of(pattern, rb_cModule)) {
15096 rb_raise(rb_eTypeError, "class or module required for rescue clause");
15097 }
15098 case VM_CHECKMATCH_TYPE_CASE: {
15099 const rb_callable_method_entry_t *me =
15100 rb_callable_method_entry_with_refinements(rb_class_of(pattern), idEqq, ((void *)0));
15101 if (me) {
15102 return rb_vm_call0(ec, pattern, idEqq, 1, &target, me, 0);
15103 }
15104 else {
15105 return rb_funcallv(pattern, idEqq, 1, &target);
15106 }
15107 }
15108 default:
15109 rb_bug("check_match: unreachable");
15110 }
15111}
15112static inline VALUE
15113double_cmp_lt(double a, double b)
15114{
15115 ;
15116 return a < b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
15117}
15118static inline VALUE
15119double_cmp_le(double a, double b)
15120{
15121 ;
15122 return a <= b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
15123}
15124static inline VALUE
15125double_cmp_gt(double a, double b)
15126{
15127 ;
15128 return a > b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
15129}
15130static inline VALUE
15131double_cmp_ge(double a, double b)
15132{
15133 ;
15134 return a >= b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
15135}
15136static inline VALUE *
15137vm_base_ptr(const rb_control_frame_t *cfp)
15138{
15139 return cfp->__bp__;
15140}
15141__attribute__((__noreturn__)) static void raise_argument_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const VALUE exc);
15142__attribute__((__noreturn__)) static void argument_arity_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int miss_argc, const int min_argc, const int max_argc);
15143__attribute__((__noreturn__)) static void argument_kw_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const char *error, const VALUE keys);
15144VALUE rb_keyword_error_new(const char *error, VALUE keys);
15145static VALUE method_missing(rb_execution_context_t *ec, VALUE obj, ID id, int argc, const VALUE *argv,
15146 enum method_missing_reason call_status, int kw_splat);
15147__attribute__ ((__visibility__("default"))) extern
15148const rb_callable_method_entry_t *rb_resolve_refined_method_callable(VALUE refinements, const rb_callable_method_entry_t *me);
15149struct args_info {
15150 VALUE *argv;
15151 int argc;
15152 int rest_index;
15153 int rest_dupped;
15154 const struct rb_callinfo_kwarg *kw_arg;
15155 VALUE *kw_argv;
15156 VALUE rest;
15157};
15158enum arg_setup_type {
15159 arg_setup_method,
15160 arg_setup_block
15161};
15162static inline void
15163arg_rest_dup(struct args_info *args)
15164{
15165 if (!args->rest_dupped) {
15166 args->rest = rb_ary_dup(args->rest);
15167 args->rest_dupped = 1;
15168 }
15169}
15170static inline int
15171args_argc(struct args_info *args)
15172{
15173 if (args->rest == ((VALUE)RUBY_Qfalse)) {
15174 return args->argc;
15175 }
15176 else {
15177 return args->argc + RARRAY_LENINT(args->rest) - args->rest_index;
15178 }
15179}
15180static inline void
15181args_extend(struct args_info *args, const int min_argc)
15182{
15183 int i;
15184 if (args->rest) {
15185 arg_rest_dup(args);
15186 ((void)0);
15187 for (i=args->argc + RARRAY_LENINT(args->rest); i<min_argc; i++) {
15188 rb_ary_push(args->rest, ((VALUE)RUBY_Qnil));
15189 }
15190 }
15191 else {
15192 for (i=args->argc; i<min_argc; i++) {
15193 args->argv[args->argc++] = ((VALUE)RUBY_Qnil);
15194 }
15195 }
15196}
15197static inline void
15198args_reduce(struct args_info *args, int over_argc)
15199{
15200 if (args->rest) {
15201 const long len = rb_array_len(args->rest);
15202 if (len > over_argc) {
15203 arg_rest_dup(args);
15204 rb_ary_resize(args->rest, len - over_argc);
15205 return;
15206 }
15207 else {
15208 args->rest = ((VALUE)RUBY_Qfalse);
15209 over_argc -= len;
15210 }
15211 }
15212 ((void)0);
15213 args->argc -= over_argc;
15214}
15215static inline int
15216args_check_block_arg0(struct args_info *args)
15217{
15218 VALUE ary = ((VALUE)RUBY_Qnil);
15219 if (args->rest && rb_array_len(args->rest) == 1) {
15220 VALUE arg0 = RARRAY_AREF(args->rest, 0);
15221 ary = rb_check_array_type(arg0);
15222 }
15223 else if (args->argc == 1) {
15224 VALUE arg0 = args->argv[0];
15225 ary = rb_check_array_type(arg0);
15226 args->argv[0] = arg0;
15227 }
15228 if (!RB_NIL_P(ary)) {
15229 args->rest = ary;
15230 args->rest_index = 0;
15231 args->argc = 0;
15232 return 1;
15233 }
15234 return 0;
15235}
15236static inline void
15237args_copy(struct args_info *args)
15238{
15239 if (args->rest != ((VALUE)RUBY_Qfalse)) {
15240 int argc = args->argc;
15241 args->argc = 0;
15242 arg_rest_dup(args);
15243 while (args->rest_index > 0 && argc > 0) {
15244 RARRAY_ASET(args->rest, --args->rest_index, args->argv[--argc]);
15245 }
15246 while (argc > 0) {
15247 rb_ary_unshift(args->rest, args->argv[--argc]);
15248 }
15249 }
15250 else if (args->argc > 0) {
15251 args->rest = rb_ary_new_from_values(args->argc, args->argv);
15252 args->rest_index = 0;
15253 args->rest_dupped = 1;
15254 args->argc = 0;
15255 }
15256}
15257static inline const VALUE *
15258args_rest_argv(struct args_info *args)
15259{
15260 return rb_array_const_ptr_transient(args->rest) + args->rest_index;
15261}
15262static inline VALUE
15263args_rest_array(struct args_info *args)
15264{
15265 VALUE ary;
15266 if (args->rest) {
15267 ary = rb_ary_behead(args->rest, args->rest_index);
15268 args->rest_index = 0;
15269 args->rest = 0;
15270 }
15271 else {
15272 ary = rb_ary_new();
15273 }
15274 return ary;
15275}
15276static int
15277args_kw_argv_to_hash(struct args_info *args)
15278{
15279 const struct rb_callinfo_kwarg *kw_arg = args->kw_arg;
15280 const VALUE *const passed_keywords = kw_arg->keywords;
15281 const int kw_len = kw_arg->keyword_len;
15282 VALUE h = rb_hash_new_with_size(kw_len);
15283 const int kw_start = args->argc - kw_len;
15284 const VALUE * const kw_argv = args->argv + kw_start;
15285 int i;
15286 args->argc = kw_start + 1;
15287 for (i=0; i<kw_len; i++) {
15288 rb_hash_aset(h, passed_keywords[i], kw_argv[i]);
15289 }
15290 args->argv[args->argc - 1] = h;
15291 return args->argc;
15292}
15293static inline void
15294args_setup_lead_parameters(struct args_info *args, int argc, VALUE *locals)
15295{
15296 if (args->argc >= argc) {
15297 args->argc -= argc;
15298 args->argv += argc;
15299 }
15300 else {
15301 int i, j;
15302 const VALUE *argv = args_rest_argv(args);
15303 for (i=args->argc, j=0; i<argc; i++, j++) {
15304 locals[i] = argv[j];
15305 }
15306 args->rest_index += argc - args->argc;
15307 args->argc = 0;
15308 }
15309}
15310static inline void
15311args_setup_post_parameters(struct args_info *args, int argc, VALUE *locals)
15312{
15313 long len;
15314 len = rb_array_len(args->rest);
15315 ruby_nonempty_memcpy((locals), (rb_array_const_ptr_transient(args->rest) + len - argc), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc)));
15316 rb_ary_resize(args->rest, len - argc);
15317}
15318static inline int
15319args_setup_opt_parameters(struct args_info *args, int opt_max, VALUE *locals)
15320{
15321 int i;
15322 if (args->argc >= opt_max) {
15323 args->argc -= opt_max;
15324 args->argv += opt_max;
15325 i = opt_max;
15326 }
15327 else {
15328 int j;
15329 i = args->argc;
15330 args->argc = 0;
15331 if (args->rest) {
15332 int len = RARRAY_LENINT(args->rest);
15333 const VALUE *argv = rb_array_const_ptr_transient(args->rest);
15334 for (; i<opt_max && args->rest_index < len; i++, args->rest_index++) {
15335 locals[i] = argv[args->rest_index];
15336 }
15337 }
15338 for (j=i; j<opt_max; j++) {
15339 locals[j] = ((VALUE)RUBY_Qnil);
15340 }
15341 }
15342 return i;
15343}
15344static inline void
15345args_setup_rest_parameter(struct args_info *args, VALUE *locals)
15346{
15347 *locals = args_rest_array(args);
15348}
15349static VALUE
15350make_unknown_kw_hash(const VALUE *passed_keywords, int passed_keyword_len, const VALUE *kw_argv)
15351{
15352 int i;
15353 VALUE obj = rb_ary_tmp_new(1);
15354 for (i=0; i<passed_keyword_len; i++) {
15355 if (kw_argv[i] != ((VALUE)RUBY_Qundef)) {
15356 rb_ary_push(obj, passed_keywords[i]);
15357 }
15358 }
15359 return obj;
15360}
15361static VALUE
15362make_rest_kw_hash(const VALUE *passed_keywords, int passed_keyword_len, const VALUE *kw_argv)
15363{
15364 int i;
15365 VALUE obj = rb_hash_new_with_size(passed_keyword_len);
15366 for (i=0; i<passed_keyword_len; i++) {
15367 if (kw_argv[i] != ((VALUE)RUBY_Qundef)) {
15368 rb_hash_aset(obj, passed_keywords[i], kw_argv[i]);
15369 }
15370 }
15371 return obj;
15372}
15373static inline int
15374args_setup_kw_parameters_lookup(const ID key, VALUE *ptr, const VALUE *const passed_keywords, VALUE *passed_values, const int passed_keyword_len)
15375{
15376 int i;
15377 const VALUE keyname = rb_id2sym(key);
15378 for (i=0; i<passed_keyword_len; i++) {
15379 if (keyname == passed_keywords[i]) {
15380 *ptr = passed_values[i];
15381 passed_values[i] = ((VALUE)RUBY_Qundef);
15382 return 1;
15383 }
15384 }
15385 return 0;
15386}
15387static void
15388args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *const iseq,
15389 VALUE *const passed_values, const int passed_keyword_len, const VALUE *const passed_keywords,
15390 VALUE *const locals)
15391{
15392 const ID *acceptable_keywords = iseq->body->param.keyword->table;
15393 const int req_key_num = iseq->body->param.keyword->required_num;
15394 const int key_num = iseq->body->param.keyword->num;
15395 const VALUE * const default_values = iseq->body->param.keyword->default_values;
15396 VALUE missing = 0;
15397 int i, di, found = 0;
15398 int unspecified_bits = 0;
15399 VALUE unspecified_bits_value = ((VALUE)RUBY_Qnil);
15400 for (i=0; i<req_key_num; i++) {
15401 ID key = acceptable_keywords[i];
15402 if (args_setup_kw_parameters_lookup(key, &locals[i], passed_keywords, passed_values, passed_keyword_len)) {
15403 found++;
15404 }
15405 else {
15406 if (!missing) missing = rb_ary_tmp_new(1);
15407 rb_ary_push(missing, rb_id2sym(key));
15408 }
15409 }
15410 if (missing) argument_kw_error(ec, iseq, "missing", missing);
15411 for (di=0; i<key_num; i++, di++) {
15412 if (args_setup_kw_parameters_lookup(acceptable_keywords[i], &locals[i], passed_keywords, passed_values, passed_keyword_len)) {
15413 found++;
15414 }
15415 else {
15416 if (default_values[di] == ((VALUE)RUBY_Qundef)) {
15417 locals[i] = ((VALUE)RUBY_Qnil);
15418 if ((__builtin_expect(!!(i < (32-1)), 1))) {
15419 unspecified_bits |= 0x01 << di;
15420 }
15421 else {
15422 if (RB_NIL_P(unspecified_bits_value)) {
15423 int j;
15424 unspecified_bits_value = rb_hash_new();
15425 for (j=0; j<(32-1); j++) {
15426 if (unspecified_bits & (0x01 << j)) {
15427 rb_hash_aset(unspecified_bits_value, __builtin_choose_expr( __builtin_constant_p(j), ((VALUE)(j)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(j)), ((VALUE)RUBY_Qtrue));
15428 }
15429 }
15430 }
15431 rb_hash_aset(unspecified_bits_value, __builtin_choose_expr( __builtin_constant_p(di), ((VALUE)(di)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(di)), ((VALUE)RUBY_Qtrue));
15432 }
15433 }
15434 else {
15435 locals[i] = default_values[di];
15436 }
15437 }
15438 }
15439 if (iseq->body->param.flags.has_kwrest) {
15440 const int rest_hash_index = key_num + 1;
15441 locals[rest_hash_index] = make_rest_kw_hash(passed_keywords, passed_keyword_len, passed_values);
15442 }
15443 else {
15444 if (found != passed_keyword_len) {
15445 VALUE keys = make_unknown_kw_hash(passed_keywords, passed_keyword_len, passed_values);
15446 argument_kw_error(ec, iseq, "unknown", keys);
15447 }
15448 }
15449 if (RB_NIL_P(unspecified_bits_value)) {
15450 unspecified_bits_value = __builtin_choose_expr( __builtin_constant_p(unspecified_bits), ((VALUE)(unspecified_bits)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(unspecified_bits));
15451 }
15452 locals[key_num] = unspecified_bits_value;
15453}
15454static inline void
15455args_setup_kw_rest_parameter(VALUE keyword_hash, VALUE *locals, int kw_flag)
15456{
15457 if (RB_NIL_P(keyword_hash)) {
15458 keyword_hash = rb_hash_new();
15459 }
15460 else if (!(kw_flag & (0x01 << VM_CALL_KW_SPLAT_MUT_bit))) {
15461 keyword_hash = rb_hash_dup(keyword_hash);
15462 }
15463 locals[0] = keyword_hash;
15464}
15465static inline void
15466args_setup_block_parameter(const rb_execution_context_t *ec, struct rb_calling_info *calling, VALUE *locals)
15467{
15468 VALUE block_handler = calling->block_handler;
15469 *locals = rb_vm_bh_to_procval(ec, block_handler);
15470}
15471struct fill_values_arg {
15472 VALUE *keys;
15473 VALUE *vals;
15474 int argc;
15475};
15476static int
15477fill_keys_values(st_data_t key, st_data_t val, st_data_t ptr)
15478{
15479 struct fill_values_arg *arg = (struct fill_values_arg *)ptr;
15480 int i = arg->argc++;
15481 arg->keys[i] = (VALUE)key;
15482 arg->vals[i] = (VALUE)val;
15483 return ST_CONTINUE;
15484}
15485static inline int
15486ignore_keyword_hash_p(VALUE keyword_hash, const rb_iseq_t * const iseq, unsigned int * kw_flag, VALUE * converted_keyword_hash)
15487{
15488 if (!RB_TYPE_P(keyword_hash, RUBY_T_HASH)) {
15489 keyword_hash = rb_to_hash_type(keyword_hash);
15490 }
15491 if (!(*kw_flag & (0x01 << VM_CALL_KW_SPLAT_MUT_bit)) &&
15492 (iseq->body->param.flags.has_kwrest ||
15493 iseq->body->param.flags.ruby2_keywords)) {
15494 *kw_flag |= (0x01 << VM_CALL_KW_SPLAT_MUT_bit);
15495 keyword_hash = rb_hash_dup(keyword_hash);
15496 }
15497 *converted_keyword_hash = keyword_hash;
15498 return !(iseq->body->param.flags.has_kw) &&
15499 !(iseq->body->param.flags.has_kwrest) &&
15500 RHASH_EMPTY_P(keyword_hash);
15501}
15502COLDFUNC static int
15503setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * const iseq,
15504 struct rb_calling_info *const calling,
15505 const struct rb_callinfo *ci,
15506 VALUE * const locals, const enum arg_setup_type arg_setup_type) {
15507 const int min_argc = iseq->body->param.lead_num + iseq->body->param.post_num;
15508 const int max_argc = (iseq->body->param.flags.has_rest == 0) ? min_argc + iseq->body->param.opt_num : (-1);
15509 int given_argc;
15510 unsigned int kw_flag = vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit));
15511 int opt_pc = 0, allow_autosplat = !kw_flag;
15512 struct args_info args_body, *args;
15513 VALUE keyword_hash = ((VALUE)RUBY_Qnil);
15514 VALUE * const orig_sp = ec->cfp->sp;
15515 unsigned int i;
15516 VALUE flag_keyword_hash = 0;
15517 VALUE converted_keyword_hash = 0;
15518 ;
15519 for (i=calling->argc; i<iseq->body->param.size; i++) {
15520 locals[i] = ((VALUE)RUBY_Qnil);
15521 }
15522 ec->cfp->sp = &locals[i];
15523 args = &args_body;
15524 given_argc = args->argc = calling->argc;
15525 args->argv = locals;
15526 args->rest_dupped = 0;
15527 if (kw_flag & (0x01 << VM_CALL_KWARG_bit)) {
15528 args->kw_arg = vm_ci_kwarg(ci);
15529 if (iseq->body->param.flags.has_kw) {
15530 int kw_len = args->kw_arg->keyword_len;
15531 args->kw_argv = ((VALUE *)__builtin_alloca (rbimpl_size_mul_or_raise(sizeof(VALUE), (kw_len))));
15532 args->argc -= kw_len;
15533 given_argc -= kw_len;
15534 ruby_nonempty_memcpy((args->kw_argv), (locals + args->argc), rbimpl_size_mul_or_raise(sizeof(VALUE), (kw_len)));
15535 }
15536 else {
15537 args->kw_argv = ((void *)0);
15538 given_argc = args_kw_argv_to_hash(args);
15539 kw_flag |= (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit);
15540 }
15541 }
15542 else {
15543 args->kw_arg = ((void *)0);
15544 args->kw_argv = ((void *)0);
15545 }
15546 if (vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) {
15547 VALUE rest_last = 0;
15548 int len;
15549 args->rest = locals[--args->argc];
15550 args->rest_index = 0;
15551 len = RARRAY_LENINT(args->rest);
15552 given_argc += len - 1;
15553 rest_last = RARRAY_AREF(args->rest, len - 1);
15554 if (!kw_flag && len > 0) {
15555 if (RB_TYPE_P(rest_last, RUBY_T_HASH) &&
15556 (((struct RHash *)rest_last)->basic.flags & RHASH_PASS_AS_KEYWORDS)) {
15557 rest_last = rb_hash_dup(rest_last);
15558 kw_flag |= (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit);
15559 }
15560 else {
15561 rest_last = 0;
15562 }
15563 }
15564 if (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) {
15565 if (ignore_keyword_hash_p(rest_last, iseq, &kw_flag, &converted_keyword_hash)) {
15566 arg_rest_dup(args);
15567 rb_ary_pop(args->rest);
15568 given_argc--;
15569 kw_flag &= ~((0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit));
15570 }
15571 else {
15572 if (rest_last != converted_keyword_hash) {
15573 rest_last = converted_keyword_hash;
15574 arg_rest_dup(args);
15575 RARRAY_ASET(args->rest, len - 1, rest_last);
15576 }
15577 if (iseq->body->param.flags.ruby2_keywords && rest_last) {
15578 flag_keyword_hash = rest_last;
15579 }
15580 else if (iseq->body->param.flags.has_kw || iseq->body->param.flags.has_kwrest) {
15581 arg_rest_dup(args);
15582 rb_ary_pop(args->rest);
15583 given_argc--;
15584 keyword_hash = rest_last;
15585 }
15586 }
15587 }
15588 }
15589 else {
15590 if (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) {
15591 VALUE last_arg = args->argv[args->argc-1];
15592 if (ignore_keyword_hash_p(last_arg, iseq, &kw_flag, &converted_keyword_hash)) {
15593 args->argc--;
15594 given_argc--;
15595 kw_flag &= ~((0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit));
15596 }
15597 else {
15598 if (last_arg != converted_keyword_hash) {
15599 last_arg = converted_keyword_hash;
15600 args->argv[args->argc-1] = last_arg;
15601 }
15602 if (iseq->body->param.flags.ruby2_keywords) {
15603 flag_keyword_hash = last_arg;
15604 }
15605 else if (iseq->body->param.flags.has_kw || iseq->body->param.flags.has_kwrest) {
15606 args->argc--;
15607 given_argc--;
15608 keyword_hash = last_arg;
15609 }
15610 }
15611 }
15612 args->rest = ((VALUE)RUBY_Qfalse);
15613 }
15614 if (flag_keyword_hash && RB_TYPE_P(flag_keyword_hash, RUBY_T_HASH)) {
15615 ((struct RHash *)flag_keyword_hash)->basic.flags |= RHASH_PASS_AS_KEYWORDS;
15616 }
15617 if (kw_flag && iseq->body->param.flags.accepts_no_kwarg) {
15618 rb_raise(rb_eArgError, "no keywords accepted");
15619 }
15620 switch (arg_setup_type) {
15621 case arg_setup_method:
15622 break;
15623 case arg_setup_block:
15624 if (given_argc == (keyword_hash == ((VALUE)RUBY_Qnil) ? 1 : 2) &&
15625 allow_autosplat &&
15626 (min_argc > 0 || iseq->body->param.opt_num > 1) &&
15627 !iseq->body->param.flags.ambiguous_param0 &&
15628 args_check_block_arg0(args)) {
15629 given_argc = RARRAY_LENINT(args->rest);
15630 }
15631 break;
15632 }
15633 if (given_argc < min_argc) {
15634 if (arg_setup_type == arg_setup_block) {
15635 do { __extension__ _Static_assert(sizeof(*((ec->cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((ec->cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((ec->cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((ec->cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((ec->cfp)->sp)[((min_argc))]; if ((__builtin_expect(!!(((ec->cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
15636 given_argc = min_argc;
15637 args_extend(args, min_argc);
15638 }
15639 else {
15640 argument_arity_error(ec, iseq, given_argc, min_argc, max_argc);
15641 }
15642 }
15643 if (given_argc > max_argc && max_argc != (-1)) {
15644 if (arg_setup_type == arg_setup_block) {
15645 args_reduce(args, given_argc - max_argc);
15646 given_argc = max_argc;
15647 }
15648 else {
15649 argument_arity_error(ec, iseq, given_argc, min_argc, max_argc);
15650 }
15651 }
15652 if (iseq->body->param.flags.has_lead) {
15653 args_setup_lead_parameters(args, iseq->body->param.lead_num, locals + 0);
15654 }
15655 if (iseq->body->param.flags.has_rest || iseq->body->param.flags.has_post){
15656 args_copy(args);
15657 }
15658 if (iseq->body->param.flags.has_post) {
15659 args_setup_post_parameters(args, iseq->body->param.post_num, locals + iseq->body->param.post_start);
15660 }
15661 if (iseq->body->param.flags.has_opt) {
15662 int opt = args_setup_opt_parameters(args, iseq->body->param.opt_num, locals + iseq->body->param.lead_num);
15663 opt_pc = (int)iseq->body->param.opt_table[opt];
15664 }
15665 if (iseq->body->param.flags.has_rest) {
15666 args_setup_rest_parameter(args, locals + iseq->body->param.rest_start);
15667 }
15668 if (iseq->body->param.flags.has_kw) {
15669 VALUE * const klocals = locals + iseq->body->param.keyword->bits_start - iseq->body->param.keyword->num;
15670 if (args->kw_argv != ((void *)0)) {
15671 const struct rb_callinfo_kwarg *kw_arg = args->kw_arg;
15672 args_setup_kw_parameters(ec, iseq, args->kw_argv, kw_arg->keyword_len, kw_arg->keywords, klocals);
15673 }
15674 else if (!RB_NIL_P(keyword_hash)) {
15675 int kw_len = rb_long2int_inline(RHASH_SIZE(keyword_hash));
15676 struct fill_values_arg arg;
15677 arg.keys = args->kw_argv = ((VALUE *)__builtin_alloca (rbimpl_size_mul_or_raise(sizeof(VALUE), (kw_len * 2))));
15678 arg.vals = arg.keys + kw_len;
15679 arg.argc = 0;
15680 rb_hash_foreach(keyword_hash, fill_keys_values, (VALUE)&arg);
15681 ((void)0);
15682 args_setup_kw_parameters(ec, iseq, arg.vals, kw_len, arg.keys, klocals);
15683 }
15684 else {
15685 ((void)0);
15686 args_setup_kw_parameters(ec, iseq, ((void *)0), 0, ((void *)0), klocals);
15687 }
15688 }
15689 else if (iseq->body->param.flags.has_kwrest) {
15690 args_setup_kw_rest_parameter(keyword_hash, locals + iseq->body->param.keyword->rest_start, kw_flag);
15691 }
15692 else if (!RB_NIL_P(keyword_hash) && RHASH_SIZE(keyword_hash) > 0 && arg_setup_type == arg_setup_method) {
15693 argument_kw_error(ec, iseq, "unknown", rb_hash_keys(keyword_hash));
15694 }
15695 if (iseq->body->param.flags.has_block) {
15696 if (iseq->body->local_iseq == iseq) {
15697 }
15698 else {
15699 args_setup_block_parameter(ec, calling, locals + iseq->body->param.block_start);
15700 }
15701 }
15702 ec->cfp->sp = orig_sp;
15703 return opt_pc;
15704}
15705static void
15706raise_argument_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const VALUE exc)
15707{
15708 VALUE at;
15709 if (iseq) {
15710 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_DUMMY | VM_ENV_FLAG_LOCAL, ((VALUE)RUBY_Qnil) ,
15711 0 , ((VALUE)RUBY_Qfalse) ,
15712 iseq->body->iseq_encoded,
15713 ec->cfp->sp, 0, 0 );
15714 at = rb_ec_backtrace_object(ec);
15715 rb_backtrace_use_iseq_first_lineno_for_last_location(at);
15716 rb_vm_pop_frame(ec);
15717 }
15718 else {
15719 at = rb_ec_backtrace_object(ec);
15720 }
15721 rb_ivar_set(exc, idBt_locations, at);
15722 rb_exc_set_backtrace(exc, at);
15723 rb_exc_raise(exc);
15724}
15725static void
15726argument_arity_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int miss_argc, const int min_argc, const int max_argc)
15727{
15728 VALUE exc = rb_arity_error_new(miss_argc, min_argc, max_argc);
15729 if (iseq->body->param.flags.has_kw) {
15730 const struct rb_iseq_param_keyword *const kw = iseq->body->param.keyword;
15731 const ID *keywords = kw->table;
15732 int req_key_num = kw->required_num;
15733 if (req_key_num > 0) {
15734 static const char required[] = "; required keywords";
15735 VALUE mesg = rb_attr_get(exc, idMesg);
15736 rb_str_resize(mesg, RSTRING_LEN(mesg)-1);
15737 rb_str_cat(mesg, required, sizeof(required) - 1 - (req_key_num == 1));
15738 ((__builtin_constant_p(":") ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((mesg), (":")));
15739 do {
15740 ((__builtin_constant_p(" ") ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((mesg), (" ")));
15741 rb_str_append(mesg, rb_id2str(*keywords++));
15742 ((__builtin_constant_p(",") ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((mesg), (",")));
15743 } while (--req_key_num);
15744 RSTRING_PTR(mesg)[RSTRING_LEN(mesg)-1] = ')';
15745 }
15746 }
15747 raise_argument_error(ec, iseq, exc);
15748}
15749static void
15750argument_kw_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const char *error, const VALUE keys)
15751{
15752 raise_argument_error(ec, iseq, rb_keyword_error_new(error, keys));
15753}
15754static inline void
15755vm_caller_setup_arg_splat(rb_control_frame_t *cfp, struct rb_calling_info *calling)
15756{
15757 int argc = calling->argc;
15758 VALUE *argv = cfp->sp - argc;
15759 VALUE ary = argv[argc-1];
15760 ;
15761 cfp->sp--;
15762 if (!RB_NIL_P(ary)) {
15763 const VALUE *ptr = rb_array_const_ptr_transient(ary);
15764 long len = rb_array_len(ary), i;
15765 do { __extension__ _Static_assert(sizeof(*((cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((cfp)->sp)[((len))]; if ((__builtin_expect(!!(((cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
15766 for (i = 0; i < len; i++) {
15767 *cfp->sp++ = ptr[i];
15768 }
15769 calling->argc += i - 1;
15770 }
15771}
15772static inline void
15773vm_caller_setup_arg_kw(rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci)
15774{
15775 const VALUE *const passed_keywords = vm_ci_kwarg(ci)->keywords;
15776 const int kw_len = vm_ci_kwarg(ci)->keyword_len;
15777 const VALUE h = rb_hash_new_with_size(kw_len);
15778 VALUE *sp = cfp->sp;
15779 int i;
15780 for (i=0; i<kw_len; i++) {
15781 rb_hash_aset(h, passed_keywords[i], (sp - kw_len)[i]);
15782 }
15783 (sp-kw_len)[0] = h;
15784 cfp->sp -= kw_len - 1;
15785 calling->argc -= kw_len - 1;
15786 calling->kw_splat = 1;
15787}
15788static VALUE
15789vm_to_proc(VALUE proc)
15790{
15791 if ((__builtin_expect(!!(!rb_obj_is_proc(proc)), 0))) {
15792 VALUE b;
15793 const rb_callable_method_entry_t *me =
15794 rb_callable_method_entry_with_refinements(rb_class_of(proc), idTo_proc, ((void *)0));
15795 if (me) {
15796 b = rb_vm_call0(rb_current_execution_context(1), proc, idTo_proc, 0, ((void *)0), me, 0);
15797 }
15798 else {
15799 b = rb_check_convert_type_with_id(proc, RUBY_T_DATA, "Proc", idTo_proc);
15800 }
15801 if (RB_NIL_P(b) || !rb_obj_is_proc(b)) {
15802 rb_raise(rb_eTypeError,
15803 "wrong argument type %s (expected Proc)",
15804 rb_obj_classname(proc));
15805 }
15806 return b;
15807 }
15808 else {
15809 return proc;
15810 }
15811}
15812static VALUE
15813refine_sym_proc_call(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg)
15814{
15815 VALUE obj;
15816 ID mid;
15817 const rb_callable_method_entry_t *me = 0;
15819 const VALUE symbol = RARRAY_AREF(callback_arg, 0);
15820 const VALUE refinements = RARRAY_AREF(callback_arg, 1);
15821 int kw_splat = rb_keyword_given_p();
15822 VALUE klass;
15823 if (argc-- < 1) {
15824 rb_raise(rb_eArgError, "no receiver given");
15825 }
15826 obj = *argv++;
15827 mid = rb_sym2id(symbol);
15828 for (klass = rb_class_of(obj); klass; klass = RCLASS_SUPER(klass)) {
15829 me = rb_callable_method_entry(klass, mid);
15830 if (me) {
15831 me = rb_resolve_refined_method_callable(refinements, me);
15832 if (me) break;
15833 }
15834 }
15835 ec = rb_current_execution_context(1);
15836 if (!RB_NIL_P(blockarg)) {
15837 vm_passed_block_handler_set(ec, blockarg);
15838 }
15839 if (!me) {
15840 return method_missing(ec, obj, mid, argc, argv, MISSING_NOENTRY, kw_splat);
15841 }
15842 return rb_vm_call0(ec, obj, mid, argc, argv, me, kw_splat);
15843}
15844static VALUE
15845vm_caller_setup_arg_block(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
15846 const struct rb_callinfo *ci, const rb_iseq_t *blockiseq, const int is_super)
15847{
15848 if (vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_BLOCKARG_bit)) {
15849 VALUE block_code = *(--reg_cfp->sp);
15850 if (RB_NIL_P(block_code)) {
15851 return 0;
15852 }
15853 else if (block_code == rb_block_param_proxy) {
15854 ((void)0);
15855 VALUE handler = VM_CF_BLOCK_HANDLER(reg_cfp);
15856 reg_cfp->block_code = (const void *) handler;
15857 return handler;
15858 }
15859 else if (RB_SYMBOL_P(block_code) && rb_method_basic_definition_p(rb_cSymbol, idTo_proc)) {
15860 const rb_cref_t *cref = vm_env_cref(reg_cfp->ep);
15861 if (cref && !RB_NIL_P(cref->refinements)) {
15862 VALUE ref = cref->refinements;
15863 VALUE func = rb_hash_lookup(ref, block_code);
15864 if (RB_NIL_P(func)) {
15865 VALUE callback_arg = rb_ary_tmp_new(2);
15866 rb_ary_push(callback_arg, block_code);
15867 rb_ary_push(callback_arg, ref);
15868 RB_OBJ_FREEZE_RAW(callback_arg);
15869 func = rb_func_lambda_new(refine_sym_proc_call, callback_arg, 1, (-1));
15870 rb_hash_aset(ref, block_code, func);
15871 }
15872 block_code = func;
15873 }
15874 return block_code;
15875 }
15876 else {
15877 return vm_to_proc(block_code);
15878 }
15879 }
15880 else if (blockiseq != ((void *)0)) {
15881 struct rb_captured_block *captured = VM_CFP_TO_CAPTURED_BLOCK(reg_cfp);
15882 captured->code.iseq = blockiseq;
15883 return VM_BH_FROM_ISEQ_BLOCK(captured);
15884 }
15885 else {
15886 if (is_super) {
15887 return ((VM_EP_LEP(((((reg_cfp)->ep)))))[(-1)]);
15888 }
15889 else {
15890 return 0;
15891 }
15892 }
15893}
15894static inline VALUE vm_call_iseq_setup_2(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, int opt_pc, int param_size, int local_size);
15895__attribute__ ((__always_inline__)) static VALUE vm_call_iseq_setup_normal(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const rb_callable_method_entry_t *me, int opt_pc, int param_size, int local_size);
15896static inline VALUE vm_call_iseq_setup_tailcall(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, int opt_pc);
15897static VALUE vm_call_super_method(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling);
15898static VALUE vm_call_method_nome(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling);
15899static VALUE vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling);
15900static inline VALUE vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling);
15901static vm_call_handler vm_call_iseq_setup_func(const struct rb_callinfo *ci, const int param_size, const int local_size);
15902static VALUE
15903vm_call_iseq_setup_tailcall_0start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
15904{
15905 ((void)0);
15906 return vm_call_iseq_setup_tailcall(ec, cfp, calling, 0);
15907}
15908static VALUE
15909vm_call_iseq_setup_normal_0start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
15910{
15911 ((void)0);
15912 const struct rb_callcache *cc = calling->cc;
15913 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
15914 int param = iseq->body->param.size;
15915 int local = iseq->body->local_table_size;
15916 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), 0, param, local);
15917}
15918static _Bool
15919rb_simple_iseq_p(const rb_iseq_t *iseq)
15920{
15921 return iseq->body->param.flags.has_opt == 0 &&
15922 iseq->body->param.flags.has_rest == 0 &&
15923 iseq->body->param.flags.has_post == 0 &&
15924 iseq->body->param.flags.has_kw == 0 &&
15925 iseq->body->param.flags.has_kwrest == 0 &&
15926 iseq->body->param.flags.accepts_no_kwarg == 0 &&
15927 iseq->body->param.flags.has_block == 0;
15928}
15929static _Bool
15930rb_iseq_only_optparam_p(const rb_iseq_t *iseq)
15931{
15932 return iseq->body->param.flags.has_opt == 1 &&
15933 iseq->body->param.flags.has_rest == 0 &&
15934 iseq->body->param.flags.has_post == 0 &&
15935 iseq->body->param.flags.has_kw == 0 &&
15936 iseq->body->param.flags.has_kwrest == 0 &&
15937 iseq->body->param.flags.accepts_no_kwarg == 0 &&
15938 iseq->body->param.flags.has_block == 0;
15939}
15940static _Bool
15941rb_iseq_only_kwparam_p(const rb_iseq_t *iseq)
15942{
15943 return iseq->body->param.flags.has_opt == 0 &&
15944 iseq->body->param.flags.has_rest == 0 &&
15945 iseq->body->param.flags.has_post == 0 &&
15946 iseq->body->param.flags.has_kw == 1 &&
15947 iseq->body->param.flags.has_kwrest == 0 &&
15948 iseq->body->param.flags.has_block == 0;
15949}
15950static _Bool
15951rb_splat_or_kwargs_p(const struct rb_callinfo *__restrict__ ci)
15952{
15953 return (vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) || (vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit)));
15954}
15955static inline void
15956CALLER_SETUP_ARG(struct rb_control_frame_struct *__restrict__ cfp,
15957 struct rb_calling_info *__restrict__ calling,
15958 const struct rb_callinfo *__restrict__ ci)
15959{
15960 if ((__builtin_expect(!!((vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) {
15961 VALUE final_hash;
15962 vm_caller_setup_arg_splat(cfp, calling);
15963 if (!(vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit))) &&
15964 calling->argc > 0 &&
15965 RB_TYPE_P((final_hash = *(cfp->sp - 1)), RUBY_T_HASH) &&
15966 (((struct RHash *)final_hash)->basic.flags & RHASH_PASS_AS_KEYWORDS)) {
15967 *(cfp->sp - 1) = rb_hash_dup(final_hash);
15968 calling->kw_splat = 1;
15969 }
15970 }
15971 if ((__builtin_expect(!!((vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit)))), 0))) {
15972 if ((vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit))) {
15973 vm_caller_setup_arg_kw(cfp, calling, ci);
15974 }
15975 else {
15976 VALUE keyword_hash = cfp->sp[-1];
15977 if (!RB_TYPE_P(keyword_hash, RUBY_T_HASH)) {
15978 cfp->sp[-1] = rb_hash_dup(rb_to_hash_type(keyword_hash));
15979 }
15980 else if (!(vm_ci_flag(ci) & (0x01 << VM_CALL_KW_SPLAT_MUT_bit))) {
15981 cfp->sp[-1] = rb_hash_dup(keyword_hash);
15982 }
15983 }
15984 }
15985}
15986static inline void
15987CALLER_REMOVE_EMPTY_KW_SPLAT(struct rb_control_frame_struct *__restrict__ cfp,
15988 struct rb_calling_info *__restrict__ calling,
15989 const struct rb_callinfo *__restrict__ ci)
15990{
15991 if ((__builtin_expect(!!(calling->kw_splat), 0))) {
15992 if (RHASH_EMPTY_P(cfp->sp[-1])) {
15993 cfp->sp--;
15994 calling->argc--;
15995 calling->kw_splat = 0;
15996 }
15997 }
15998}
15999static VALUE
16000vm_call_iseq_setup_normal_opt_start(rb_execution_context_t *ec, rb_control_frame_t *cfp,
16001 struct rb_calling_info *calling)
16002{
16003 const struct rb_callcache *cc = calling->cc;
16004 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
16005 const int lead_num = iseq->body->param.lead_num;
16006 const int opt = calling->argc - lead_num;
16007 const int opt_num = iseq->body->param.opt_num;
16008 const int opt_pc = (int)iseq->body->param.opt_table[opt];
16009 const int param = iseq->body->param.size;
16010 const int local = iseq->body->local_table_size;
16011 const int delta = opt_num - opt;
16012 ((void)0);
16013 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), opt_pc, param - delta, local);
16014}
16015static VALUE
16016vm_call_iseq_setup_tailcall_opt_start(rb_execution_context_t *ec, rb_control_frame_t *cfp,
16017 struct rb_calling_info *calling)
16018{
16019 const struct rb_callcache *cc = calling->cc;
16020 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
16021 const int lead_num = iseq->body->param.lead_num;
16022 const int opt = calling->argc - lead_num;
16023 const int opt_pc = (int)iseq->body->param.opt_table[opt];
16024 ((void)0);
16025 return vm_call_iseq_setup_tailcall(ec, cfp, calling, opt_pc);
16026}
16027static void
16028args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *const iseq,
16029 VALUE *const passed_values, const int passed_keyword_len, const VALUE *const passed_keywords,
16030 VALUE *const locals);
16031static VALUE
16032vm_call_iseq_setup_kwparm_kwarg(rb_execution_context_t *ec, rb_control_frame_t *cfp,
16033 struct rb_calling_info *calling)
16034{
16035 const struct rb_callinfo *ci = calling->ci;
16036 const struct rb_callcache *cc = calling->cc;
16037 ((void)0);
16038 ((void)0);
16039 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
16040 const struct rb_iseq_param_keyword *kw_param = iseq->body->param.keyword;
16041 const struct rb_callinfo_kwarg *kw_arg = vm_ci_kwarg(ci);
16042 const int ci_kw_len = kw_arg->keyword_len;
16043 const VALUE * const ci_keywords = kw_arg->keywords;
16044 VALUE *argv = cfp->sp - calling->argc;
16045 VALUE *const klocals = argv + kw_param->bits_start - kw_param->num;
16046 const int lead_num = iseq->body->param.lead_num;
16047 VALUE * const ci_kws = ((VALUE *)__builtin_alloca (rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len))));
16048 ruby_nonempty_memcpy((ci_kws), (argv + lead_num), rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len)));
16049 args_setup_kw_parameters(ec, iseq, ci_kws, ci_kw_len, ci_keywords, klocals);
16050 int param = iseq->body->param.size;
16051 int local = iseq->body->local_table_size;
16052 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), 0, param, local);
16053}
16054static VALUE
16055vm_call_iseq_setup_kwparm_nokwarg(rb_execution_context_t *ec, rb_control_frame_t *cfp,
16056 struct rb_calling_info *calling)
16057{
16058 const struct rb_callinfo *__attribute__ ((__unused__)) ci = calling->ci;
16059 const struct rb_callcache *cc = calling->cc;
16060 ((void)0);
16061 ((void)0);
16062 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
16063 const struct rb_iseq_param_keyword *kw_param = iseq->body->param.keyword;
16064 VALUE * const argv = cfp->sp - calling->argc;
16065 VALUE * const klocals = argv + kw_param->bits_start - kw_param->num;
16066 int i;
16067 for (i=0; i<kw_param->num; i++) {
16068 klocals[i] = kw_param->default_values[i];
16069 }
16070 klocals[i] = __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0));
16071 int param = iseq->body->param.size;
16072 int local = iseq->body->local_table_size;
16073 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), 0, param, local);
16074}
16075static inline int
16076vm_callee_setup_arg(rb_execution_context_t *ec, struct rb_calling_info *calling,
16077 const rb_iseq_t *iseq, VALUE *argv, int param_size, int local_size)
16078{
16079 const struct rb_callinfo *ci = calling->ci;
16080 const struct rb_callcache *cc = calling->cc;
16081 _Bool cacheable_ci = vm_ci_markable(ci);
16082 if ((__builtin_expect(!!(!(vm_ci_flag(ci) & (0x01 << VM_CALL_KW_SPLAT_bit))), 1))) {
16083 if ((__builtin_expect(!!(rb_simple_iseq_p(iseq)), 1))) {
16084 rb_control_frame_t *cfp = ec->cfp;
16085 CALLER_SETUP_ARG(cfp, calling, ci);
16086 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
16087 if (calling->argc != iseq->body->param.lead_num) {
16088 argument_arity_error(ec, iseq, calling->argc, iseq->body->param.lead_num, iseq->body->param.lead_num);
16089 }
16090 ((void)0);
16091 ((void)0);
16092 CC_SET_FASTPATH(cc, vm_call_iseq_setup_func(ci, param_size, local_size), cacheable_ci && vm_call_iseq_optimizable_p(ci, cc));
16093 return 0;
16094 }
16095 else if (rb_iseq_only_optparam_p(iseq)) {
16096 rb_control_frame_t *cfp = ec->cfp;
16097 CALLER_SETUP_ARG(cfp, calling, ci);
16098 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
16099 const int lead_num = iseq->body->param.lead_num;
16100 const int opt_num = iseq->body->param.opt_num;
16101 const int argc = calling->argc;
16102 const int opt = argc - lead_num;
16103 if (opt < 0 || opt > opt_num) {
16104 argument_arity_error(ec, iseq, argc, lead_num, lead_num + opt_num);
16105 }
16106 if ((__builtin_expect(!!(!(vm_ci_flag(ci) & (0x01 << VM_CALL_TAILCALL_bit))), 1))) {
16107 CC_SET_FASTPATH(cc, vm_call_iseq_setup_normal_opt_start,
16108 !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) &&
16109 cacheable_ci && !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
16110 }
16111 else {
16112 CC_SET_FASTPATH(cc, vm_call_iseq_setup_tailcall_opt_start,
16113 !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) &&
16114 cacheable_ci && !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
16115 }
16116 ((void)0);
16117 for (int i=argc; i<lead_num + opt_num; i++) {
16118 argv[i] = ((VALUE)RUBY_Qnil);
16119 }
16120 return (int)iseq->body->param.opt_table[opt];
16121 }
16122 else if (rb_iseq_only_kwparam_p(iseq) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit))) {
16123 const int lead_num = iseq->body->param.lead_num;
16124 const int argc = calling->argc;
16125 const struct rb_iseq_param_keyword *kw_param = iseq->body->param.keyword;
16126 if (vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) {
16127 const struct rb_callinfo_kwarg *kw_arg = vm_ci_kwarg(ci);
16128 if (argc - kw_arg->keyword_len == lead_num) {
16129 const int ci_kw_len = kw_arg->keyword_len;
16130 const VALUE * const ci_keywords = kw_arg->keywords;
16131 VALUE * const ci_kws = ((VALUE *)__builtin_alloca (rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len))));
16132 ruby_nonempty_memcpy((ci_kws), (argv + lead_num), rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len)));
16133 VALUE *const klocals = argv + kw_param->bits_start - kw_param->num;
16134 args_setup_kw_parameters(ec, iseq, ci_kws, ci_kw_len, ci_keywords, klocals);
16135 CC_SET_FASTPATH(cc, vm_call_iseq_setup_kwparm_kwarg,
16136 cacheable_ci && !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
16137 return 0;
16138 }
16139 }
16140 else if (argc == lead_num) {
16141 VALUE *const klocals = argv + kw_param->bits_start - kw_param->num;
16142 args_setup_kw_parameters(ec, iseq, ((void *)0), 0, ((void *)0), klocals);
16143 if (klocals[kw_param->num] == __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0))) {
16144 CC_SET_FASTPATH(cc, vm_call_iseq_setup_kwparm_nokwarg,
16145 cacheable_ci && !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
16146 }
16147 return 0;
16148 }
16149 }
16150 }
16151 return setup_parameters_complex(ec, iseq, calling, ci, argv, arg_setup_method);
16152}
16153COLDFUNC static VALUE
16154vm_call_iseq_setup(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) {
16155 ((void)0);
16156 const struct rb_callcache *cc = calling->cc;
16157 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
16158 const int param_size = iseq->body->param.size;
16159 const int local_size = iseq->body->local_table_size;
16160 const int opt_pc = vm_callee_setup_arg(ec, calling, def_iseq_ptr(vm_cc_cme(cc)->def), cfp->sp - calling->argc, param_size, local_size);
16161 return vm_call_iseq_setup_2(ec, cfp, calling, opt_pc, param_size, local_size);
16162}
16163COLDFUNC static VALUE
16164vm_call_iseq_setup_2(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling,
16165 int opt_pc, int param_size, int local_size) {
16166 const struct rb_callinfo *ci = calling->ci;
16167 const struct rb_callcache *cc = calling->cc;
16168 if ((__builtin_expect(!!(!(vm_ci_flag(ci) & (0x01 << VM_CALL_TAILCALL_bit))), 1))) {
16169 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), opt_pc, param_size, local_size);
16170 }
16171 else {
16172 return vm_call_iseq_setup_tailcall(ec, cfp, calling, opt_pc);
16173 }
16174}
16175static inline VALUE
16176vm_call_iseq_setup_normal(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const rb_callable_method_entry_t *me,
16177 int opt_pc, int param_size, int local_size)
16178{
16179 const rb_iseq_t *iseq = def_iseq_ptr(me->def);
16180 VALUE *argv = cfp->sp - calling->argc;
16181 VALUE *sp = argv + param_size;
16182 cfp->sp = argv - 1 ;
16183 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL, calling->recv,
16184 calling->block_handler, (VALUE)me,
16185 iseq->body->iseq_encoded + opt_pc, sp,
16186 local_size - param_size,
16187 iseq->body->stack_max);
16188 return ((VALUE)RUBY_Qundef);
16189}
16190COLDFUNC static VALUE
16191vm_call_iseq_setup_tailcall(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, int opt_pc) {
16192 const struct rb_callcache *cc = calling->cc;
16193 unsigned int i;
16194 VALUE *argv = cfp->sp - calling->argc;
16195 const rb_callable_method_entry_t *me = vm_cc_cme(cc);
16196 const rb_iseq_t *iseq = def_iseq_ptr(me->def);
16197 VALUE *src_argv = argv;
16198 VALUE *sp_orig, *sp;
16199 VALUE finish_flag = VM_FRAME_FINISHED_P(cfp) ? VM_FRAME_FLAG_FINISH : 0;
16200 if (VM_BH_FROM_CFP_P(calling->block_handler, cfp)) {
16201 struct rb_captured_block *dst_captured = VM_CFP_TO_CAPTURED_BLOCK(((cfp)+1));
16202 const struct rb_captured_block *src_captured = VM_BH_TO_CAPT_BLOCK(calling->block_handler);
16203 dst_captured->code.val = src_captured->code.val;
16204 if (VM_BH_ISEQ_BLOCK_P(calling->block_handler)) {
16205 calling->block_handler = VM_BH_FROM_ISEQ_BLOCK(dst_captured);
16206 }
16207 else {
16208 calling->block_handler = VM_BH_FROM_IFUNC_BLOCK(dst_captured);
16209 }
16210 }
16211 vm_pop_frame(ec, cfp, cfp->ep);
16212 cfp = ec->cfp;
16213 sp_orig = sp = cfp->sp;
16214 sp[0] = calling->recv;
16215 sp++;
16216 for (i=0; i < iseq->body->param.size; i++) {
16217 *sp++ = src_argv[i];
16218 }
16219 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL | finish_flag,
16220 calling->recv, calling->block_handler, (VALUE)me,
16221 iseq->body->iseq_encoded + opt_pc, sp,
16222 iseq->body->local_table_size - iseq->body->param.size,
16223 iseq->body->stack_max);
16224 cfp->sp = sp_orig;
16225 return ((VALUE)RUBY_Qundef);
16226}
16227static void
16228ractor_unsafe_check(void)
16229{
16230 if (!rb_ractor_main_p()) {
16231 rb_raise(rb_eRactorUnsafeError, "ractor unsafe method called from not main ractor");
16232 }
16233}
16234static VALUE
16235call_cfunc_m2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16236{
16237 ractor_unsafe_check();
16238 return (*func)(recv, rb_ary_new_from_values(argc, argv));
16239}
16240static VALUE
16241call_cfunc_m1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16242{
16243 ractor_unsafe_check();
16244 return (*func)(argc, argv, recv);
16245}
16246static VALUE
16247call_cfunc_0(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16248{
16249 ractor_unsafe_check();
16250 VALUE(*f)(VALUE) = (VALUE(*)(VALUE))func;
16251 return (*f)(recv);
16252}
16253static VALUE
16254call_cfunc_1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16255{
16256 ractor_unsafe_check();
16257 VALUE(*f)(VALUE, VALUE) = (VALUE(*)(VALUE, VALUE))func;
16258 return (*f)(recv, argv[0]);
16259}
16260static VALUE
16261call_cfunc_2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16262{
16263 ractor_unsafe_check();
16264 VALUE(*f)(VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE))func;
16265 return (*f)(recv, argv[0], argv[1]);
16266}
16267static VALUE
16268call_cfunc_3(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16269{
16270 ractor_unsafe_check();
16271 VALUE(*f)(VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE))func;
16272 return (*f)(recv, argv[0], argv[1], argv[2]);
16273}
16274static VALUE
16275call_cfunc_4(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16276{
16277 ractor_unsafe_check();
16278 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE))func;
16279 return (*f)(recv, argv[0], argv[1], argv[2], argv[3]);
16280}
16281static VALUE
16282call_cfunc_5(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16283{
16284 ractor_unsafe_check();
16285 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
16286 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4]);
16287}
16288static VALUE
16289call_cfunc_6(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16290{
16291 ractor_unsafe_check();
16293 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
16294}
16295static VALUE
16296call_cfunc_7(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16297{
16298 ractor_unsafe_check();
16300 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
16301}
16302static VALUE
16303call_cfunc_8(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16304{
16305 ractor_unsafe_check();
16307 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
16308}
16309static VALUE
16310call_cfunc_9(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16311{
16312 ractor_unsafe_check();
16314 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]);
16315}
16316static VALUE
16317call_cfunc_10(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16318{
16319 ractor_unsafe_check();
16321 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]);
16322}
16323static VALUE
16324call_cfunc_11(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16325{
16326 ractor_unsafe_check();
16328 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]);
16329}
16330static VALUE
16331call_cfunc_12(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16332{
16333 ractor_unsafe_check();
16335 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]);
16336}
16337static VALUE
16338call_cfunc_13(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16339{
16340 ractor_unsafe_check();
16342 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]);
16343}
16344static VALUE
16345call_cfunc_14(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16346{
16347 ractor_unsafe_check();
16349 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]);
16350}
16351static VALUE
16352call_cfunc_15(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16353{
16354 ractor_unsafe_check();
16356 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]);
16357}
16358static VALUE
16359ractor_safe_call_cfunc_m2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16360{
16361 return (*func)(recv, rb_ary_new_from_values(argc, argv));
16362}
16363static VALUE
16364ractor_safe_call_cfunc_m1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16365{
16366 return (*func)(argc, argv, recv);
16367}
16368static VALUE
16369ractor_safe_call_cfunc_0(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16370{
16371 VALUE(*f)(VALUE) = (VALUE(*)(VALUE))func;
16372 return (*f)(recv);
16373}
16374static VALUE
16375ractor_safe_call_cfunc_1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16376{
16377 VALUE(*f)(VALUE, VALUE) = (VALUE(*)(VALUE, VALUE))func;
16378 return (*f)(recv, argv[0]);
16379}
16380static VALUE
16381ractor_safe_call_cfunc_2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16382{
16383 VALUE(*f)(VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE))func;
16384 return (*f)(recv, argv[0], argv[1]);
16385}
16386static VALUE
16387ractor_safe_call_cfunc_3(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16388{
16389 VALUE(*f)(VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE))func;
16390 return (*f)(recv, argv[0], argv[1], argv[2]);
16391}
16392static VALUE
16393ractor_safe_call_cfunc_4(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16394{
16395 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE))func;
16396 return (*f)(recv, argv[0], argv[1], argv[2], argv[3]);
16397}
16398static VALUE
16399ractor_safe_call_cfunc_5(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16400{
16401 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
16402 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4]);
16403}
16404static VALUE
16405ractor_safe_call_cfunc_6(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16406{
16408 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
16409}
16410static VALUE
16411ractor_safe_call_cfunc_7(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16412{
16414 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
16415}
16416static VALUE
16417ractor_safe_call_cfunc_8(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16418{
16420 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
16421}
16422static VALUE
16423ractor_safe_call_cfunc_9(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16424{
16426 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]);
16427}
16428static VALUE
16429ractor_safe_call_cfunc_10(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16430{
16432 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]);
16433}
16434static VALUE
16435ractor_safe_call_cfunc_11(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16436{
16438 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]);
16439}
16440static VALUE
16441ractor_safe_call_cfunc_12(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16442{
16444 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]);
16445}
16446static VALUE
16447ractor_safe_call_cfunc_13(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16448{
16450 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]);
16451}
16452static VALUE
16453ractor_safe_call_cfunc_14(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16454{
16456 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]);
16457}
16458static VALUE
16459ractor_safe_call_cfunc_15(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
16460{
16462 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]);
16463}
16464static inline int
16465vm_cfp_consistent_p(rb_execution_context_t *ec, const rb_control_frame_t *reg_cfp)
16466{
16467 const int ov_flags = RAISED_STACKOVERFLOW;
16468 if ((__builtin_expect(!!(reg_cfp == ec->cfp + 1), 1))) return 1;
16469 if ((((ec)->raised_flag & (ov_flags)) != 0)) {
16470 ((ec)->raised_flag &= ~(ov_flags));
16471 return 1;
16472 }
16473 return 0;
16474}
16475static inline
16476const rb_method_cfunc_t *
16477vm_method_cfunc_entry(const rb_callable_method_entry_t *me)
16478{
16479 return __extension__({
16480 ;
16481 ; __typeof__(&(me->def)->body.cfunc) unaligned_member_access_result = (&(me->def)->body.cfunc);
16482 ; unaligned_member_access_result; });
16483}
16484static VALUE
16485vm_call_cfunc_with_frame(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
16486{
16487 ((void)0);
16488 const struct rb_callinfo *ci = calling->ci;
16489 const struct rb_callcache *cc = calling->cc;
16490 VALUE val;
16491 const rb_callable_method_entry_t *me = vm_cc_cme(cc);
16492 const rb_method_cfunc_t *cfunc = vm_method_cfunc_entry(me);
16493 int len = cfunc->argc;
16494 VALUE recv = calling->recv;
16495 VALUE block_handler = calling->block_handler;
16496 VALUE frame_type = VM_FRAME_MAGIC_CFUNC | VM_FRAME_FLAG_CFRAME | VM_ENV_FLAG_LOCAL;
16497 int argc = calling->argc;
16498 int orig_argc = argc;
16499 if ((__builtin_expect(!!(calling->kw_splat), 0))) {
16500 frame_type |= VM_FRAME_FLAG_CFRAME_KW;
16501 }
16502 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
16503 do { const rb_event_flag_t flag_arg_ = (0x0020); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, recv, me->def->original_id, vm_ci_mid(ci), me->owner, ((VALUE)RUBY_Qundef), 0); } } while (0);
16504 vm_push_frame(ec, ((void *)0), frame_type, recv,
16505 block_handler, (VALUE)me,
16506 0, ec->cfp->sp, 0, 0);
16507 if (len >= 0) rb_check_arity(argc, len, len);
16508 reg_cfp->sp -= orig_argc + 1;
16509 val = (*cfunc->invoker)(recv, argc, reg_cfp->sp + 1, cfunc->func);
16510 ((__builtin_expect(!!(vm_cfp_consistent_p(ec, reg_cfp)), 1)) ? (void)0 : rb_bug("vm_call_cfunc" ": cfp consistency error (%p, %p)", (void *)reg_cfp, (void *)(ec->cfp+1)));
16511 rb_vm_pop_frame(ec);
16512 do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, recv, me->def->original_id, vm_ci_mid(ci), me->owner, val, 0); } } while (0);
16513 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
16514 return val;
16515}
16516static VALUE
16517vm_call_cfunc(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
16518{
16519 const struct rb_callinfo *ci = calling->ci;
16520 ((void)0);
16521 CALLER_SETUP_ARG(reg_cfp, calling, ci);
16522 CALLER_REMOVE_EMPTY_KW_SPLAT(reg_cfp, calling, ci);
16523 CC_SET_FASTPATH(calling->cc, vm_call_cfunc_with_frame, !rb_splat_or_kwargs_p(ci) && !calling->kw_splat);
16524 return vm_call_cfunc_with_frame(ec, reg_cfp, calling);
16525}
16526static VALUE
16527vm_call_ivar(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
16528{
16529 const struct rb_callcache *cc = calling->cc;
16530 ((void)0);
16531 cfp->sp -= 1;
16532 return vm_getivar(calling->recv, vm_cc_cme(cc)->def->body.attr.id, ((void *)0), ((void *)0), cc, 1);
16533}
16534static VALUE
16535vm_call_attrset(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
16536{
16537 const struct rb_callcache *cc = calling->cc;
16538 ((void)0);
16539 VALUE val = *(cfp->sp - 1);
16540 cfp->sp -= 2;
16541 return vm_setivar(calling->recv, vm_cc_cme(cc)->def->body.attr.id, val, ((void *)0), ((void *)0), cc, 1);
16542}
16543static inline VALUE
16544vm_call_bmethod_body(rb_execution_context_t *ec, struct rb_calling_info *calling, const VALUE *argv)
16545{
16546 rb_proc_t *proc;
16547 VALUE val;
16548 const struct rb_callcache *cc = calling->cc;
16549 const rb_callable_method_entry_t *cme = vm_cc_cme(cc);
16550 VALUE procv = cme->def->body.bmethod.proc;
16551 if (!RB_FL_TEST_RAW((procv), RUBY_FL_SHAREABLE) &&
16552 cme->def->body.bmethod.defined_ractor != rb_ractor_self(rb_ec_ractor_ptr(ec))) {
16553 rb_raise(rb_eRuntimeError, "defined in a different Ractor");
16554 }
16555 (((proc)) = (rb_proc_t*)((struct RData *)(((procv))))->data);
16556 val = rb_vm_invoke_bmethod(ec, proc, calling->recv, calling->argc, argv, calling->kw_splat, calling->block_handler, vm_cc_cme(cc));
16557 return val;
16558}
16559static VALUE
16560vm_call_bmethod(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
16561{
16562 ((void)0);
16563 VALUE *argv;
16564 int argc;
16565 const struct rb_callinfo *ci = calling->ci;
16566 CALLER_SETUP_ARG(cfp, calling, ci);
16567 argc = calling->argc;
16568 argv = ((VALUE *)__builtin_alloca (rbimpl_size_mul_or_raise(sizeof(VALUE), (argc))));
16569 ruby_nonempty_memcpy((argv), (cfp->sp - argc), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc)));
16570 cfp->sp += - argc - 1;
16571 return vm_call_bmethod_body(ec, calling, argv);
16572}static inline
16573__attribute__ ((__visibility__("default"))) VALUE
16574rb_find_defined_class_by_owner(VALUE current_class, VALUE target_owner)
16575{
16576 VALUE klass = current_class;
16577 if (RB_TYPE_P(klass, RUBY_T_ICLASS) && RB_FL_TEST(klass, ((VALUE)RUBY_FL_USER5)) &&
16579 klass = RBASIC_CLASS(klass);
16580 }
16581 while (RB_TEST(klass)) {
16582 VALUE owner = RB_TYPE_P(klass, RUBY_T_ICLASS) ? RBASIC_CLASS(klass) : klass;
16583 if (owner == target_owner) {
16584 return klass;
16585 }
16586 klass = RCLASS_SUPER(klass);
16587 }
16588 return current_class;
16589}
16590static const rb_callable_method_entry_t *
16591aliased_callable_method_entry(const rb_callable_method_entry_t *me)
16592{
16593 const rb_method_entry_t *orig_me = me->def->body.alias.original_me;
16594 const rb_callable_method_entry_t *cme;
16595 if (orig_me->defined_class == 0) {
16596 VALUE defined_class = rb_find_defined_class_by_owner(me->defined_class, orig_me->owner);
16597 ((void)0);
16598 cme = rb_method_entry_complement_defined_class(orig_me, me->called_id, defined_class);
16599 if (me->def->alias_count + me->def->complemented_count == 0) {
16600 rb_obj_write((VALUE)(me), __extension__({
16601 ;
16602 ; __typeof__((VALUE *)(&me->def->body.alias.original_me)) unaligned_member_access_result = ((VALUE *)(&me->def->body.alias.original_me));
16603 ; unaligned_member_access_result; }), (VALUE)(cme), "./vm_insnhelper.c", 3044);
16604 }
16605 else {
16607 rb_method_definition_create(VM_METHOD_TYPE_ALIAS, me->def->original_id);
16608 rb_method_definition_set((rb_method_entry_t *)me, def, (void *)cme);
16609 }
16610 }
16611 else {
16612 cme = (const rb_callable_method_entry_t *)orig_me;
16613 }
16614 ((void)0);
16615 return cme;
16616}
16617static VALUE
16618vm_call_alias(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
16619{
16620 calling->cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = ((VALUE)RUBY_Qundef), .cme_ = aliased_callable_method_entry(vm_cc_cme(calling->cc)), .call_ = vm_call_general, .aux_ = { 0 }, };
16621 return vm_call_method_each_type(ec, cfp, calling);
16622}
16623static enum method_missing_reason
16624ci_missing_reason(const struct rb_callinfo *ci)
16625{
16626 enum method_missing_reason stat = MISSING_NOENTRY;
16627 if (vm_ci_flag(ci) & (0x01 << VM_CALL_VCALL_bit)) stat |= MISSING_VCALL;
16628 if (vm_ci_flag(ci) & (0x01 << VM_CALL_FCALL_bit)) stat |= MISSING_FCALL;
16629 if (vm_ci_flag(ci) & (0x01 << VM_CALL_SUPER_bit)) stat |= MISSING_SUPER;
16630 return stat;
16631}
16632static VALUE
16633vm_call_symbol(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
16634 struct rb_calling_info *calling, const struct rb_callinfo *ci, VALUE symbol)
16635{
16636 ((__builtin_expect(!!(!!(calling->argc >= 0)), 1)) ? ((void)0) : __builtin_unreachable());
16637 enum method_missing_reason missing_reason = MISSING_NOENTRY;
16638 int argc = calling->argc;
16639 VALUE recv = calling->recv;
16640 VALUE klass = rb_class_of(recv);
16641 ID mid = rb_check_id(&symbol);
16642 int flags = (0x01 << VM_CALL_FCALL_bit) |
16643 (0x01 << VM_CALL_OPT_SEND_bit) |
16644 (calling->kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0);
16645 if ((__builtin_expect(!!(! mid), 0))) {
16646 mid = idMethodMissing;
16647 missing_reason = ci_missing_reason(ci);
16648 ec->method_missing_reason = missing_reason;
16649 int i = argc;
16650 do { __extension__ _Static_assert(sizeof(*((reg_cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((reg_cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((reg_cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((reg_cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((reg_cfp)->sp)[((1))]; if ((__builtin_expect(!!(((reg_cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
16651 (((reg_cfp)->sp) += (((1))));
16652 memmove((&(*(((((reg_cfp)->sp)))-(i - 1)-1))), (&(*(((((reg_cfp)->sp)))-(i)-1))), rbimpl_size_mul_or_raise(sizeof(VALUE), (i)));
16653 argc = ++calling->argc;
16654 if (rb_method_basic_definition_p(klass, idMethodMissing)) {
16655 (*(((((reg_cfp)->sp)))-(i)-1)) = symbol;
16656 int priv = vm_ci_flag(ci) & ((0x01 << VM_CALL_FCALL_bit) | (0x01 << VM_CALL_VCALL_bit));
16657 const VALUE *argv = (((((reg_cfp)->sp)))-(argc));
16658 VALUE exc = rb_make_no_method_exception(
16659 rb_eNoMethodError, 0, recv, argc, argv, priv);
16660 rb_exc_raise(exc);
16661 }
16662 else {
16663 (*(((((reg_cfp)->sp)))-(i)-1)) = rb_str_intern(symbol);
16664 }
16665 }
16666 calling->ci = &(struct rb_callinfo) { .flags = RUBY_T_IMEMO | (imemo_callinfo << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .mid = mid, .flag = flags, .argc = argc, .kwarg = vm_ci_kwarg(ci), };
16667 calling->cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = klass, .cme_ = rb_callable_method_entry_with_refinements(klass, mid, ((void *)0)), .call_ = vm_call_general, .aux_ = { .method_missing_reason = missing_reason }, };
16668 return vm_call_method(ec, reg_cfp, calling);
16669}
16670static VALUE
16671vm_call_opt_send(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
16672{
16673 ((void)0);
16674 int i;
16675 VALUE sym;
16676 CALLER_SETUP_ARG(reg_cfp, calling, calling->ci);
16677 i = calling->argc - 1;
16678 if (calling->argc == 0) {
16679 rb_raise(rb_eArgError, "no method name given");
16680 }
16681 else {
16682 sym = (*(((((reg_cfp)->sp)))-(i)-1));
16683 if (i > 0) {
16684 memmove((&(*(((((reg_cfp)->sp)))-(i)-1))), (&(*(((((reg_cfp)->sp)))-(i-1)-1))), rbimpl_size_mul_or_raise(sizeof(VALUE), (i)));
16685 }
16686 calling->argc -= 1;
16687 (((reg_cfp)->sp) -= (((1))));
16688 return vm_call_symbol(ec, reg_cfp, calling, calling->ci, sym);
16689 }
16690}
16691static inline VALUE vm_invoke_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, _Bool is_lambda, VALUE block_handler);
16692__attribute__((__noinline__)) static VALUE vm_invoke_block_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, VALUE block_handler);
16693static VALUE
16694vm_invoke_block_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
16695 struct rb_calling_info *calling, const struct rb_callinfo *ci, VALUE block_handler)
16696{
16697 int argc = calling->argc;
16698 if (argc > 0) memmove((&(*(((((reg_cfp)->sp)))-(argc)-1))), (&(*(((((reg_cfp)->sp)))-(argc-1)-1))), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc)));
16699 (((reg_cfp)->sp) -= (((1))));
16700 return vm_invoke_block(ec, reg_cfp, calling, ci, 0, block_handler);
16701}
16702static VALUE
16703vm_call_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
16704{
16705 ((void)0);
16706 const struct rb_callinfo *ci = calling->ci;
16707 VALUE procval = calling->recv;
16708 return vm_invoke_block_opt_call(ec, reg_cfp, calling, ci, VM_BH_FROM_PROC(procval));
16709}
16710static VALUE
16711vm_call_opt_block_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
16712{
16713 ((void)0);
16714 VALUE block_handler = VM_ENV_BLOCK_HANDLER(VM_CF_LEP(reg_cfp));
16715 const struct rb_callinfo *ci = calling->ci;
16716 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_CALL)]&((1 << 12))) == 0), 1)))) {
16717 return vm_invoke_block_opt_call(ec, reg_cfp, calling, ci, block_handler);
16718 }
16719 else {
16720 calling->recv = rb_vm_bh_to_procval(ec, block_handler);
16721 calling->cc = rb_vm_search_method_slowpath(ci, rb_class_of(calling->recv));
16722 return vm_call_general(ec, reg_cfp, calling);
16723 }
16724}
16725static VALUE
16726vm_call_method_missing_body(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling,
16727 const struct rb_callinfo *orig_ci, enum method_missing_reason reason)
16728{
16729 ((void)0);
16730 VALUE *argv = (((((reg_cfp)->sp)))-(calling->argc));
16731 unsigned int argc;
16732 CALLER_SETUP_ARG(reg_cfp, calling, orig_ci);
16733 argc = calling->argc + 1;
16734 unsigned int flag = (0x01 << VM_CALL_FCALL_bit) | (0x01 << VM_CALL_OPT_SEND_bit) | (calling->kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0);
16735 calling->argc = argc;
16736 do { __extension__ _Static_assert(sizeof(*((reg_cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((reg_cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((reg_cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((reg_cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((reg_cfp)->sp)[((1))]; if ((__builtin_expect(!!(((reg_cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
16737 ;
16738 if (argc > 1) {
16739 memmove((argv+1), (argv), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc-1)));
16740 }
16741 argv[0] = rb_id2sym(vm_ci_mid(orig_ci));
16742 (((reg_cfp)->sp) += (((1))));
16743 ec->method_missing_reason = reason;
16744 calling->ci = &(struct rb_callinfo) { .flags = RUBY_T_IMEMO | (imemo_callinfo << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .mid = idMethodMissing, .flag = flag, .argc = argc, .kwarg = vm_ci_kwarg(orig_ci), };
16745 calling->cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = ((VALUE)RUBY_Qundef), .cme_ = rb_callable_method_entry_without_refinements(rb_class_of(calling->recv), idMethodMissing, ((void *)0)), .call_ = vm_call_general, .aux_ = { 0 }, };
16746 return vm_call_method(ec, reg_cfp, calling);
16747}
16748static VALUE
16749vm_call_method_missing(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
16750{
16751 return vm_call_method_missing_body(ec, reg_cfp, calling, calling->ci, vm_cc_cmethod_missing_reason(calling->cc));
16752}
16753static const rb_callable_method_entry_t *refined_method_callable_without_refinement(const rb_callable_method_entry_t *me);
16754static VALUE
16755vm_call_zsuper(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, VALUE klass)
16756{
16757 klass = RCLASS_SUPER(klass);
16758 const rb_callable_method_entry_t *cme = klass ? rb_callable_method_entry(klass, vm_ci_mid(calling->ci)) : ((void *)0);
16759 if (cme == ((void *)0)) {
16760 return vm_call_method_nome(ec, cfp, calling);
16761 }
16762 if (cme->def->type == VM_METHOD_TYPE_REFINED &&
16763 cme->def->body.refined.orig_me) {
16764 cme = refined_method_callable_without_refinement(cme);
16765 }
16766 calling->cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = ((VALUE)RUBY_Qundef), .cme_ = cme, .call_ = vm_call_general, .aux_ = { 0 }, };
16767 return vm_call_method_each_type(ec, cfp, calling);
16768}
16769static inline VALUE
16770find_refinement(VALUE refinements, VALUE klass)
16771{
16772 if (RB_NIL_P(refinements)) {
16773 return ((VALUE)RUBY_Qnil);
16774 }
16775 return rb_hash_lookup(refinements, klass);
16776}
16777__attribute__((__pure__)) static rb_control_frame_t * current_method_entry(const rb_execution_context_t *ec, rb_control_frame_t *cfp);
16778static rb_control_frame_t *
16779current_method_entry(const rb_execution_context_t *ec, rb_control_frame_t *cfp)
16780{
16781 rb_control_frame_t *top_cfp = cfp;
16782 if (cfp->iseq && cfp->iseq->body->type == ISEQ_TYPE_BLOCK) {
16783 const rb_iseq_t *local_iseq = cfp->iseq->body->local_iseq;
16784 do {
16785 cfp = ((cfp)+1);
16786 if (RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) {
16787 return top_cfp;
16788 }
16789 } while (cfp->iseq != local_iseq);
16790 }
16791 return cfp;
16792}
16793static const rb_callable_method_entry_t *
16794refined_method_callable_without_refinement(const rb_callable_method_entry_t *me)
16795{
16796 const rb_method_entry_t *orig_me = me->def->body.refined.orig_me;
16797 const rb_callable_method_entry_t *cme;
16798 if (orig_me->defined_class == 0) {
16799 cme = ((void *)0);
16801 }
16802 else {
16803 cme = (const rb_callable_method_entry_t *)orig_me;
16804 }
16805 ((void)0);
16806 if ((!(cme) || !(cme)->def || (cme)->def->type == VM_METHOD_TYPE_UNDEF)) {
16807 cme = ((void *)0);
16808 }
16809 return cme;
16810}
16811static const rb_callable_method_entry_t *
16812search_refined_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
16813{
16814 ID mid = vm_ci_mid(calling->ci);
16815 const rb_cref_t *cref = vm_get_cref(cfp->ep);
16816 const struct rb_callcache * const cc = calling->cc;
16817 const rb_callable_method_entry_t *cme = vm_cc_cme(cc);
16818 for (; cref; cref = CREF_NEXT(cref)) {
16819 const VALUE refinement = find_refinement(CREF_REFINEMENTS(cref), vm_cc_cme(cc)->owner);
16820 if (RB_NIL_P(refinement)) continue;
16821 const rb_callable_method_entry_t *const ref_me =
16822 rb_callable_method_entry(refinement, mid);
16823 if (ref_me) {
16824 if (vm_cc_call(cc) == vm_call_super_method) {
16825 const rb_control_frame_t *top_cfp = current_method_entry(ec, cfp);
16826 const rb_callable_method_entry_t *top_me = rb_vm_frame_method_entry(top_cfp);
16827 if (top_me && rb_method_definition_eq(ref_me->def, top_me->def)) {
16828 continue;
16829 }
16830 }
16831 if (cme->def->type != VM_METHOD_TYPE_REFINED ||
16832 cme->def != ref_me->def) {
16833 cme = ref_me;
16834 }
16835 if (ref_me->def->type != VM_METHOD_TYPE_REFINED) {
16836 return cme;
16837 }
16838 }
16839 else {
16840 return ((void *)0);
16841 }
16842 }
16843 if (vm_cc_cme(cc)->def->body.refined.orig_me) {
16844 return refined_method_callable_without_refinement(vm_cc_cme(cc));
16845 }
16846 else {
16847 VALUE klass = RCLASS_SUPER(vm_cc_cme(cc)->defined_class);
16848 const rb_callable_method_entry_t *cme = klass ? rb_callable_method_entry(klass, mid) : ((void *)0);
16849 return cme;
16850 }
16851}
16852static VALUE
16853vm_call_refined(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
16854{
16855 struct rb_callcache *ref_cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = ((VALUE)RUBY_Qundef), .cme_ = search_refined_method(ec, cfp, calling), .call_ = vm_call_general, .aux_ = { 0 }, };
16856 if (vm_cc_cme(ref_cc)) {
16857 calling->cc= ref_cc;
16858 return vm_call_method(ec, cfp, calling);
16859 }
16860 else {
16861 return vm_call_method_nome(ec, cfp, calling);
16862 }
16863}
16864COLDFUNC static VALUE
16865vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) {
16866 const struct rb_callinfo *ci = calling->ci;
16867 const struct rb_callcache *cc = calling->cc;
16868 switch (vm_cc_cme(cc)->def->type) {
16869 case VM_METHOD_TYPE_ISEQ:
16870 CC_SET_FASTPATH(cc, vm_call_iseq_setup, 1);
16871 return vm_call_iseq_setup(ec, cfp, calling);
16872 case VM_METHOD_TYPE_NOTIMPLEMENTED:
16873 case VM_METHOD_TYPE_CFUNC:
16874 CC_SET_FASTPATH(cc, vm_call_cfunc, 1);
16875 return vm_call_cfunc(ec, cfp, calling);
16876 case VM_METHOD_TYPE_ATTRSET:
16877 CALLER_SETUP_ARG(cfp, calling, ci);
16878 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
16879 rb_check_arity(calling->argc, 1, 1);
16880 vm_cc_attr_index_set(cc, 0);
16881 CC_SET_FASTPATH(cc, vm_call_attrset, !(vm_ci_flag(ci) & ((0x01 << VM_CALL_ARGS_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KWARG_bit))));
16882 return vm_call_attrset(ec, cfp, calling);
16883 case VM_METHOD_TYPE_IVAR:
16884 CALLER_SETUP_ARG(cfp, calling, ci);
16885 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
16886 rb_check_arity(calling->argc, 0, 0);
16887 vm_cc_attr_index_set(cc, 0);
16888 CC_SET_FASTPATH(cc, vm_call_ivar, !(vm_ci_flag(ci) & ((0x01 << VM_CALL_ARGS_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_bit))));
16889 return vm_call_ivar(ec, cfp, calling);
16890 case VM_METHOD_TYPE_MISSING:
16891 vm_cc_method_missing_reason_set(cc, 0);
16892 CC_SET_FASTPATH(cc, vm_call_method_missing, 1);
16893 return vm_call_method_missing(ec, cfp, calling);
16894 case VM_METHOD_TYPE_BMETHOD:
16895 CC_SET_FASTPATH(cc, vm_call_bmethod, 1);
16896 return vm_call_bmethod(ec, cfp, calling);
16897 case VM_METHOD_TYPE_ALIAS:
16898 CC_SET_FASTPATH(cc, vm_call_alias, 1);
16899 return vm_call_alias(ec, cfp, calling);
16900 case VM_METHOD_TYPE_OPTIMIZED:
16901 switch (vm_cc_cme(cc)->def->body.optimize_type) {
16902 case OPTIMIZED_METHOD_TYPE_SEND:
16903 CC_SET_FASTPATH(cc, vm_call_opt_send, 1);
16904 return vm_call_opt_send(ec, cfp, calling);
16905 case OPTIMIZED_METHOD_TYPE_CALL:
16906 CC_SET_FASTPATH(cc, vm_call_opt_call, 1);
16907 return vm_call_opt_call(ec, cfp, calling);
16908 case OPTIMIZED_METHOD_TYPE_BLOCK_CALL:
16909 CC_SET_FASTPATH(cc, vm_call_opt_block_call, 1);
16910 return vm_call_opt_block_call(ec, cfp, calling);
16911 default:
16912 rb_bug("vm_call_method: unsupported optimized method type (%d)",
16913 vm_cc_cme(cc)->def->body.optimize_type);
16914 }
16915 case VM_METHOD_TYPE_UNDEF:
16916 break;
16917 case VM_METHOD_TYPE_ZSUPER:
16918 return vm_call_zsuper(ec, cfp, calling, ((((struct RClass *)(vm_cc_cme(cc)->defined_class))->ptr)->origin_));
16919 case VM_METHOD_TYPE_REFINED:
16920 return vm_call_refined(ec, cfp, calling);
16921 }
16922 rb_bug("vm_call_method: unsupported method type (%d)", vm_cc_cme(cc)->def->type);
16923}
16924__attribute__((__noreturn__)) static void vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj, int call_status);
16925static VALUE
16926vm_call_method_nome(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
16927{
16928 const struct rb_callinfo *ci = calling->ci;
16929 const int stat = ci_missing_reason(ci);
16930 if (vm_ci_mid(ci) == idMethodMissing) {
16931 rb_control_frame_t *reg_cfp = cfp;
16932 VALUE *argv = (((((reg_cfp)->sp)))-(calling->argc));
16933 vm_raise_method_missing(ec, calling->argc, argv, calling->recv, stat);
16934 }
16935 else {
16936 return vm_call_method_missing_body(ec, cfp, calling, ci, stat);
16937 }
16938}
16939static inline VALUE
16940vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
16941{
16942 const struct rb_callinfo *ci = calling->ci;
16943 const struct rb_callcache *cc = calling->cc;
16944 ((void)0);
16945 if (vm_cc_cme(cc) != ((void *)0)) {
16946 switch ((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0))) {
16947 case METHOD_VISI_PUBLIC:
16948 return vm_call_method_each_type(ec, cfp, calling);
16949 case METHOD_VISI_PRIVATE:
16950 if (!(vm_ci_flag(ci) & (0x01 << VM_CALL_FCALL_bit))) {
16951 enum method_missing_reason stat = MISSING_PRIVATE;
16952 if (vm_ci_flag(ci) & (0x01 << VM_CALL_VCALL_bit)) stat |= MISSING_VCALL;
16953 vm_cc_method_missing_reason_set(cc, stat);
16954 CC_SET_FASTPATH(cc, vm_call_method_missing, 1);
16955 return vm_call_method_missing(ec, cfp, calling);
16956 }
16957 return vm_call_method_each_type(ec, cfp, calling);
16958 case METHOD_VISI_PROTECTED:
16959 if (!(vm_ci_flag(ci) & (0x01 << VM_CALL_OPT_SEND_bit))) {
16960 if (!rb_obj_is_kind_of(cfp->self, vm_cc_cme(cc)->defined_class)) {
16961 vm_cc_method_missing_reason_set(cc, MISSING_PROTECTED);
16962 return vm_call_method_missing(ec, cfp, calling);
16963 }
16964 else {
16965 ((void)0);
16966 struct rb_callcache cc_on_stack = *cc;
16967 RB_FL_SET_RAW((VALUE)&cc_on_stack, ((VALUE)RUBY_FL_USER4));
16968 calling->cc = &cc_on_stack;
16969 return vm_call_method_each_type(ec, cfp, calling);
16970 }
16971 }
16972 return vm_call_method_each_type(ec, cfp, calling);
16973 default:
16974 rb_bug("unreachable");
16975 }
16976 }
16977 else {
16978 return vm_call_method_nome(ec, cfp, calling);
16979 }
16980}
16981static VALUE
16982vm_call_general(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
16983{
16984 ((void)0);
16985 return vm_call_method(ec, reg_cfp, calling);
16986}
16987static VALUE
16988vm_call_super_method(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
16989{
16990 ((void)0);
16991 const struct rb_callcache *cc = calling->cc;
16992 if (vm_cc_call(cc) != vm_call_super_method) rb_bug("bug");
16993 return vm_call_method(ec, reg_cfp, calling);
16994}
16995static inline VALUE
16996vm_search_normal_superclass(VALUE klass)
16997{
16998 if (RB_BUILTIN_TYPE(klass) == RUBY_T_ICLASS &&
16999 RB_FL_TEST_RAW(((struct RBasic *)(klass))->klass, RMODULE_IS_REFINEMENT)) {
17000 klass = ((struct RBasic *)(klass))->klass;
17001 }
17002 klass = ((((struct RClass *)(klass))->ptr)->origin_);
17003 return RCLASS_SUPER(klass);
17004}
17005__attribute__((__noreturn__)) static void vm_super_outside(void);
17006static void
17007vm_super_outside(void)
17008{
17009 rb_raise(rb_eNoMethodError, "super called outside of method");
17010}
17011static const struct rb_callcache *
17012vm_search_super_method(const rb_control_frame_t *reg_cfp, struct rb_call_data *cd, VALUE recv)
17013{
17014 VALUE current_defined_class;
17015 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(reg_cfp);
17016 if (!me) {
17017 vm_super_outside();
17018 }
17019 current_defined_class = me->defined_class;
17020 if (!RB_NIL_P(((((struct RClass *)(current_defined_class))->ptr)->refined_class))) {
17021 current_defined_class = ((((struct RClass *)(current_defined_class))->ptr)->refined_class);
17022 }
17023 if (RB_BUILTIN_TYPE(current_defined_class) != RUBY_T_MODULE &&
17024 !RB_FL_TEST_RAW(current_defined_class, RMODULE_INCLUDED_INTO_REFINEMENT) &&
17025 reg_cfp->iseq != method_entry_iseqptr(me) &&
17026 !rb_obj_is_kind_of(recv, current_defined_class)) {
17027 VALUE m = RB_TYPE_P(current_defined_class, RUBY_T_ICLASS) ?
17028 ((((struct RClass *)(current_defined_class))->ptr)->includer) : current_defined_class;
17029 if (m) {
17030 rb_raise(rb_eTypeError,
17031 "self has wrong type to call super in this context: "
17032 "%""l""i" "\v"" (expected %""l""i" "\v"")",
17033 rb_obj_class(recv), m);
17034 }
17035 }
17036 if (me->def->type == VM_METHOD_TYPE_BMETHOD && (vm_ci_flag(cd->ci) & (0x01 << VM_CALL_ZSUPER_bit))) {
17037 rb_raise(rb_eRuntimeError,
17038 "implicit argument passing of super from method defined"
17039 " by define_method() is not supported."
17040 " Specify all arguments explicitly.");
17041 }
17042 ID mid = me->def->original_id;
17043 cd->ci = vm_ci_new_runtime_(mid, vm_ci_flag(cd->ci), vm_ci_argc(cd->ci), vm_ci_kwarg(cd->ci), "./vm_insnhelper.c", 3630);
17044 (rb_obj_written((VALUE)(reg_cfp->iseq), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(cd->ci), "./vm_insnhelper.c", 3635));
17045 const struct rb_callcache *cc;
17046 VALUE klass = vm_search_normal_superclass(me->defined_class);
17047 if (!klass) {
17048 cc = vm_cc_new(klass, ((void *)0), vm_call_method_missing);
17049 rb_obj_write((VALUE)(reg_cfp->iseq), __extension__({
17050 ;
17051 ; __typeof__((VALUE *)(&cd->cc)) unaligned_member_access_result = ((VALUE *)(&cd->cc));
17052 ; unaligned_member_access_result; }), (VALUE)(cc), "./vm_insnhelper.c", 3644);
17053 }
17054 else {
17055 cc = vm_search_method_fastpath((VALUE)reg_cfp->iseq, cd, klass);
17056 const rb_callable_method_entry_t *cached_cme = vm_cc_cme(cc);
17057 if (cached_cme == ((void *)0)) {
17058 static const struct rb_callcache *empty_cc_for_super = ((void *)0);
17059 if (empty_cc_for_super == ((void *)0)) {
17060 empty_cc_for_super = vm_cc_new(0, ((void *)0), vm_call_super_method);
17061 RB_FL_SET_RAW((VALUE)empty_cc_for_super, ((VALUE)RUBY_FL_USER4));
17062 rb_gc_register_mark_object((VALUE)empty_cc_for_super);
17063 }
17064 rb_obj_write((VALUE)(reg_cfp->iseq), __extension__({
17065 ;
17066 ; __typeof__((VALUE *)(&cd->cc)) unaligned_member_access_result = ((VALUE *)(&cd->cc));
17067 ; unaligned_member_access_result; }), (VALUE)(cc = empty_cc_for_super), "./vm_insnhelper.c", 3659);
17068 }
17069 else if (cached_cme->called_id != mid) {
17070 const rb_callable_method_entry_t *cme = rb_callable_method_entry(klass, mid);
17071 cc = vm_cc_new(klass, cme, vm_call_super_method);
17072 rb_obj_write((VALUE)(reg_cfp->iseq), __extension__({
17073 ;
17074 ; __typeof__((VALUE *)(&cd->cc)) unaligned_member_access_result = ((VALUE *)(&cd->cc));
17075 ; unaligned_member_access_result; }), (VALUE)(cc), "./vm_insnhelper.c", 3664);
17076 }
17077 else {
17078 switch (cached_cme->def->type) {
17079 case VM_METHOD_TYPE_REFINED:
17080 case VM_METHOD_TYPE_ATTRSET:
17081 case VM_METHOD_TYPE_IVAR:
17082 vm_cc_call_set(cc, vm_call_super_method);
17083 break;
17084 default:
17085 break;
17086 }
17087 }
17088 }
17089 return cc;
17090}
17091static inline int
17092block_proc_is_lambda(const VALUE procval)
17093{
17094 rb_proc_t *proc;
17095 if (procval) {
17096 (((proc)) = (rb_proc_t*)((struct RData *)(((procval))))->data);
17097 return proc->is_lambda;
17098 }
17099 else {
17100 return 0;
17101 }
17102}
17103static VALUE
17104vm_yield_with_cfunc(rb_execution_context_t *ec,
17105 const struct rb_captured_block *captured,
17106 VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler,
17108{
17109 int is_lambda = 0;
17110 VALUE val, arg, blockarg;
17111 int frame_flag;
17112 const struct vm_ifunc *ifunc = captured->code.ifunc;
17113 if (is_lambda) {
17114 arg = rb_ary_new_from_values(argc, argv);
17115 }
17116 else if (argc == 0) {
17117 arg = ((VALUE)RUBY_Qnil);
17118 }
17119 else {
17120 arg = argv[0];
17121 }
17122 blockarg = rb_vm_bh_to_procval(ec, block_handler);
17123 frame_flag = VM_FRAME_MAGIC_IFUNC | VM_FRAME_FLAG_CFRAME | (me ? VM_FRAME_FLAG_BMETHOD : 0);
17124 if (kw_splat) {
17125 frame_flag |= VM_FRAME_FLAG_CFRAME_KW;
17126 }
17127 vm_push_frame(ec, (const rb_iseq_t *)captured->code.ifunc,
17128 frame_flag,
17129 self,
17130 ((VALUE)((captured->ep)) | (0x01)),
17131 (VALUE)me,
17132 0, ec->cfp->sp, 0, 0);
17133 val = (*ifunc->func)(arg, (VALUE)ifunc->data, argc, argv, blockarg);
17134 rb_vm_pop_frame(ec);
17135 return val;
17136}
17137static VALUE
17138vm_yield_with_symbol(rb_execution_context_t *ec, VALUE symbol, int argc, const VALUE *argv, int kw_splat, VALUE block_handler)
17139{
17140 return rb_sym_proc_call(rb_sym2id(symbol), argc, argv, kw_splat, rb_vm_bh_to_procval(ec, block_handler));
17141}
17142static inline int
17143vm_callee_setup_block_arg_arg0_splat(rb_control_frame_t *cfp, const rb_iseq_t *iseq, VALUE *argv, VALUE ary)
17144{
17145 int i;
17146 long len = rb_array_len(ary);
17147 do { __extension__ _Static_assert(sizeof(*((cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((cfp)->sp)[((iseq->body->param.lead_num))]; if ((__builtin_expect(!!(((cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
17148 for (i=0; i<len && i<iseq->body->param.lead_num; i++) {
17149 argv[i] = RARRAY_AREF(ary, i);
17150 }
17151 return i;
17152}
17153static inline VALUE
17154vm_callee_setup_block_arg_arg0_check(VALUE *argv)
17155{
17156 VALUE ary, arg0 = argv[0];
17157 ary = rb_check_array_type(arg0);
17158 ((void)0);
17159 return ary;
17160}
17161static int
17162vm_callee_setup_block_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, const struct rb_callinfo *ci, const rb_iseq_t *iseq, VALUE *argv, const enum arg_setup_type arg_setup_type)
17163{
17164 if (rb_simple_iseq_p(iseq)) {
17165 rb_control_frame_t *cfp = ec->cfp;
17166 VALUE arg0;
17167 CALLER_SETUP_ARG(cfp, calling, ci);
17168 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
17169 if (arg_setup_type == arg_setup_block &&
17170 calling->argc == 1 &&
17171 iseq->body->param.flags.has_lead &&
17172 !iseq->body->param.flags.ambiguous_param0 &&
17173 !RB_NIL_P(arg0 = vm_callee_setup_block_arg_arg0_check(argv))) {
17174 calling->argc = vm_callee_setup_block_arg_arg0_splat(cfp, iseq, argv, arg0);
17175 }
17176 if (calling->argc != iseq->body->param.lead_num) {
17177 if (arg_setup_type == arg_setup_block) {
17178 if (calling->argc < iseq->body->param.lead_num) {
17179 int i;
17180 do { __extension__ _Static_assert(sizeof(*((cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((cfp)->sp)[((iseq->body->param.lead_num))]; if ((__builtin_expect(!!(((cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
17181 for (i=calling->argc; i<iseq->body->param.lead_num; i++) argv[i] = ((VALUE)RUBY_Qnil);
17182 calling->argc = iseq->body->param.lead_num;
17183 }
17184 else if (calling->argc > iseq->body->param.lead_num) {
17185 calling->argc = iseq->body->param.lead_num;
17186 }
17187 }
17188 else {
17189 argument_arity_error(ec, iseq, calling->argc, iseq->body->param.lead_num, iseq->body->param.lead_num);
17190 }
17191 }
17192 return 0;
17193 }
17194 else {
17195 return setup_parameters_complex(ec, iseq, calling, ci, argv, arg_setup_type);
17196 }
17197}
17198static int
17199vm_yield_setup_args(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int argc, VALUE *argv, int kw_splat, VALUE block_handler, enum arg_setup_type arg_setup_type)
17200{
17201 struct rb_calling_info calling_entry, *calling;
17202 calling = &calling_entry;
17203 calling->argc = argc;
17204 calling->block_handler = block_handler;
17205 calling->kw_splat = kw_splat;
17206 calling->recv = ((VALUE)RUBY_Qundef);
17207 struct rb_callinfo dummy_ci = (struct rb_callinfo) { .flags = RUBY_T_IMEMO | (imemo_callinfo << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .mid = 0, .flag = (kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0), .argc = 0, .kwarg = 0, };
17208 return vm_callee_setup_block_arg(ec, calling, &dummy_ci, iseq, argv, arg_setup_type);
17209}
17210static VALUE
17211vm_invoke_iseq_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
17212 struct rb_calling_info *calling, const struct rb_callinfo *ci,
17213 _Bool is_lambda, VALUE block_handler)
17214{
17215 const struct rb_captured_block *captured = VM_BH_TO_ISEQ_BLOCK(block_handler);
17216 const rb_iseq_t *iseq = rb_iseq_check(captured->code.iseq);
17217 const int arg_size = iseq->body->param.size;
17218 VALUE * const rsp = ((((reg_cfp)->sp))) - calling->argc;
17219 int opt_pc = vm_callee_setup_block_arg(ec, calling, ci, iseq, rsp, is_lambda ? arg_setup_method : arg_setup_block);
17220 (((reg_cfp)->sp) = (((rsp))));
17221 vm_push_frame(ec, iseq,
17222 VM_FRAME_MAGIC_BLOCK | (is_lambda ? VM_FRAME_FLAG_LAMBDA : 0),
17223 captured->self,
17224 ((VALUE)((captured->ep)) | (0x01)), 0,
17225 iseq->body->iseq_encoded + opt_pc,
17226 rsp + arg_size,
17227 iseq->body->local_table_size - arg_size, iseq->body->stack_max);
17228 return ((VALUE)RUBY_Qundef);
17229}
17230static VALUE
17231vm_invoke_symbol_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
17232 struct rb_calling_info *calling, const struct rb_callinfo *ci,
17233 __attribute__ ((__unused__)) _Bool is_lambda, VALUE block_handler)
17234{
17235 if (calling->argc < 1) {
17236 rb_raise(rb_eArgError, "no receiver given");
17237 }
17238 else {
17239 VALUE symbol = VM_BH_TO_SYMBOL(block_handler);
17240 CALLER_SETUP_ARG(reg_cfp, calling, ci);
17241 calling->recv = (*(((((reg_cfp)->sp)))-(--calling->argc)-1));
17242 return vm_call_symbol(ec, reg_cfp, calling, ci, symbol);
17243 }
17244}
17245static VALUE
17246vm_invoke_ifunc_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
17247 struct rb_calling_info *calling, const struct rb_callinfo *ci,
17248 __attribute__ ((__unused__)) _Bool is_lambda, VALUE block_handler)
17249{
17250 VALUE val;
17251 int argc;
17252 const struct rb_captured_block *captured = VM_BH_TO_IFUNC_BLOCK(block_handler);
17253 CALLER_SETUP_ARG(ec->cfp, calling, ci);
17254 CALLER_REMOVE_EMPTY_KW_SPLAT(ec->cfp, calling, ci);
17255 argc = calling->argc;
17256 val = vm_yield_with_cfunc(ec, captured, captured->self, argc, (((((reg_cfp)->sp)))-(argc)), calling->kw_splat, calling->block_handler, ((void *)0));
17257 ((((reg_cfp)->sp) -= (((argc)))));
17258 return val;
17259}
17260static VALUE
17261vm_proc_to_block_handler(VALUE procval)
17262{
17263 const struct rb_block *block = vm_proc_block(procval);
17264 switch (vm_block_type(block)) {
17265 case block_type_iseq:
17266 return VM_BH_FROM_ISEQ_BLOCK(&block->as.captured);
17267 case block_type_ifunc:
17268 return VM_BH_FROM_IFUNC_BLOCK(&block->as.captured);
17269 case block_type_symbol:
17270 return VM_BH_FROM_SYMBOL(block->as.symbol);
17271 case block_type_proc:
17272 return VM_BH_FROM_PROC(block->as.proc);
17273 }
17274 __builtin_unreachable();
17275 return ((VALUE)RUBY_Qundef);
17276}
17277static VALUE
17278vm_invoke_proc_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
17279 struct rb_calling_info *calling, const struct rb_callinfo *ci,
17280 _Bool is_lambda, VALUE block_handler)
17281{
17282 while (vm_block_handler_type(block_handler) == block_handler_type_proc) {
17283 VALUE proc = VM_BH_TO_PROC(block_handler);
17284 is_lambda = block_proc_is_lambda(proc);
17285 block_handler = vm_proc_to_block_handler(proc);
17286 }
17287 return vm_invoke_block(ec, reg_cfp, calling, ci, is_lambda, block_handler);
17288}
17289static inline VALUE
17290vm_invoke_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
17291 struct rb_calling_info *calling, const struct rb_callinfo *ci,
17292 _Bool is_lambda, VALUE block_handler)
17293{
17294 VALUE (*func)(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
17295 struct rb_calling_info *calling, const struct rb_callinfo *ci,
17296 _Bool is_lambda, VALUE block_handler);
17297 switch (vm_block_handler_type(block_handler)) {
17298 case block_handler_type_iseq: func = vm_invoke_iseq_block; break;
17299 case block_handler_type_ifunc: func = vm_invoke_ifunc_block; break;
17300 case block_handler_type_proc: func = vm_invoke_proc_block; break;
17301 case block_handler_type_symbol: func = vm_invoke_symbol_block; break;
17302 default: rb_bug("vm_invoke_block: unreachable");
17303 }
17304 return func(ec, reg_cfp, calling, ci, is_lambda, block_handler);
17305}
17306static VALUE
17307vm_make_proc_with_iseq(const rb_iseq_t *blockiseq)
17308{
17309 const rb_execution_context_t *ec = rb_current_execution_context(1);
17310 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
17311 struct rb_captured_block *captured;
17312 if (cfp == 0) {
17313 rb_bug("vm_make_proc_with_iseq: unreachable");
17314 }
17315 captured = VM_CFP_TO_CAPTURED_BLOCK(cfp);
17316 captured->code.iseq = blockiseq;
17317 return rb_vm_make_proc(ec, captured, rb_cProc);
17318}
17319static VALUE
17320vm_once_exec(VALUE iseq)
17321{
17322 VALUE proc = vm_make_proc_with_iseq((rb_iseq_t *)iseq);
17323 return rb_proc_call_with_block(proc, 0, 0, ((VALUE)RUBY_Qnil));
17324}
17325static VALUE
17326vm_once_clear(VALUE data)
17327{
17328 union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)data;
17329 is->once.running_thread = ((void *)0);
17330 return ((VALUE)RUBY_Qnil);
17331}
17332static enum defined_type
17333check_respond_to_missing(VALUE obj, VALUE v)
17334{
17335 VALUE args[2];
17336 VALUE r;
17337 args[0] = obj; args[1] = ((VALUE)RUBY_Qfalse);
17338 r = rb_check_funcall(v, idRespond_to_missing, 2, args);
17339 if (r != ((VALUE)RUBY_Qundef) && RB_TEST(r)) {
17340 return DEFINED_METHOD;
17341 }
17342 else {
17343 return DEFINED_NOT_DEFINED;
17344 }
17345}
17346static VALUE
17347vm_defined(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, rb_num_t op_type, VALUE obj, VALUE needstr, VALUE v)
17348{
17349 VALUE klass;
17350 enum defined_type expr_type = DEFINED_NOT_DEFINED;
17351 enum defined_type type = (enum defined_type)op_type;
17352 switch (type) {
17353 case DEFINED_IVAR:
17354 if (rb_ivar_defined((((((reg_cfp)))->self)), rb_sym2id(obj))) {
17355 expr_type = DEFINED_IVAR;
17356 }
17357 break;
17358 case DEFINED_IVAR2:
17359 klass = vm_get_cbase(((((reg_cfp)->ep))));
17360 break;
17361 case DEFINED_GVAR:
17362 if (rb_gvar_defined(rb_sym2id(obj))) {
17363 expr_type = DEFINED_GVAR;
17364 }
17365 break;
17366 case DEFINED_CVAR: {
17367 const rb_cref_t *cref = vm_get_cref(((((reg_cfp)->ep))));
17368 klass = vm_get_cvar_base(cref, (((reg_cfp))), 0);
17369 if (rb_cvar_defined(klass, rb_sym2id(obj))) {
17370 expr_type = DEFINED_CVAR;
17371 }
17372 break;
17373 }
17374 case DEFINED_CONST:
17375 case DEFINED_CONST_FROM: {
17376 _Bool allow_nil = type == DEFINED_CONST;
17377 klass = v;
17378 if (vm_get_ev_const(ec, klass, rb_sym2id(obj), allow_nil, 1)) {
17379 expr_type = DEFINED_CONST;
17380 }
17381 break;
17382 }
17383 case DEFINED_FUNC:
17384 klass = rb_class_of(v);
17385 if (rb_ec_obj_respond_to(ec, v, rb_sym2id(obj), 1)) {
17386 expr_type = DEFINED_METHOD;
17387 }
17388 break;
17389 case DEFINED_METHOD:{
17390 VALUE klass = rb_class_of(v);
17391 const rb_method_entry_t *me = rb_method_entry_with_refinements(klass, rb_sym2id(obj), ((void *)0));
17392 if (me) {
17393 switch ((rb_method_visibility_t)(((me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0))) {
17394 case METHOD_VISI_PRIVATE:
17395 break;
17396 case METHOD_VISI_PROTECTED:
17397 if (!rb_obj_is_kind_of((((((reg_cfp)))->self)), rb_class_real(me->defined_class))) {
17398 break;
17399 }
17400 case METHOD_VISI_PUBLIC:
17401 expr_type = DEFINED_METHOD;
17402 break;
17403 default:
17404 rb_bug("vm_defined: unreachable: %u", (unsigned int)(rb_method_visibility_t)(((me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)));
17405 }
17406 }
17407 else {
17408 expr_type = check_respond_to_missing(obj, v);
17409 }
17410 break;
17411 }
17412 case DEFINED_YIELD:
17413 if (((VM_EP_LEP(((((reg_cfp)->ep)))))[(-1)]) != 0) {
17414 expr_type = DEFINED_YIELD;
17415 }
17416 break;
17417 case DEFINED_ZSUPER:
17418 {
17419 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry((((reg_cfp))));
17420 if (me) {
17421 VALUE klass = vm_search_normal_superclass(me->defined_class);
17422 ID id = me->def->original_id;
17423 if (rb_method_boundp(klass, id, 0)) {
17424 expr_type = DEFINED_ZSUPER;
17425 }
17426 }
17427 }
17428 break;
17429 case DEFINED_REF:{
17430 if (vm_getspecial(ec, (VM_EP_LEP(((((reg_cfp)->ep))))), ((VALUE)RUBY_Qfalse), RB_FIX2INT(obj)) != ((VALUE)RUBY_Qnil)) {
17431 expr_type = DEFINED_GVAR;
17432 }
17433 break;
17434 }
17435 default:
17436 rb_bug("unimplemented defined? type (VM)");
17437 break;
17438 }
17439 if (expr_type != 0) {
17440 if (needstr != ((VALUE)RUBY_Qfalse)) {
17441 return rb_iseq_defined_string(expr_type);
17442 }
17443 else {
17444 return ((VALUE)RUBY_Qtrue);
17445 }
17446 }
17447 else {
17448 return ((VALUE)RUBY_Qnil);
17449 }
17450}
17451static const VALUE *
17452vm_get_ep(const VALUE *const reg_ep, rb_num_t lv)
17453{
17454 rb_num_t i;
17455 const VALUE *ep = reg_ep;
17456 for (i = 0; i < lv; i++) {
17457 ep = ((VALUE *)((ep)[(-1)] & ~0x03));
17458 }
17459 return ep;
17460}
17461static VALUE
17462vm_get_special_object(const VALUE *const reg_ep,
17463 enum vm_special_object_type type)
17464{
17465 switch (type) {
17466 case VM_SPECIAL_OBJECT_VMCORE:
17467 return rb_mRubyVMFrozenCore;
17468 case VM_SPECIAL_OBJECT_CBASE:
17469 return vm_get_cbase(reg_ep);
17470 case VM_SPECIAL_OBJECT_CONST_BASE:
17471 return vm_get_const_base(reg_ep);
17472 default:
17473 rb_bug("putspecialobject insn: unknown value_type %d", type);
17474 }
17475}
17476static VALUE
17477vm_concat_array(VALUE ary1, VALUE ary2st)
17478{
17479 const VALUE ary2 = ary2st;
17480 VALUE tmp1 = rb_check_to_array(ary1);
17481 VALUE tmp2 = rb_check_to_array(ary2);
17482 if (RB_NIL_P(tmp1)) {
17483 tmp1 = __extension__ ({ const VALUE args_to_new_ary[] = {ary1}; if (__builtin_constant_p(1)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); });
17484 }
17485 if (RB_NIL_P(tmp2)) {
17486 tmp2 = __extension__ ({ const VALUE args_to_new_ary[] = {ary2}; if (__builtin_constant_p(1)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); });
17487 }
17488 if (tmp1 == ary1) {
17489 tmp1 = rb_ary_dup(ary1);
17490 }
17491 return rb_ary_concat(tmp1, tmp2);
17492}
17493static VALUE
17494vm_splat_array(VALUE flag, VALUE ary)
17495{
17496 VALUE tmp = rb_check_to_array(ary);
17497 if (RB_NIL_P(tmp)) {
17498 return __extension__ ({ const VALUE args_to_new_ary[] = {ary}; if (__builtin_constant_p(1)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); });
17499 }
17500 else if (RB_TEST(flag)) {
17501 return rb_ary_dup(tmp);
17502 }
17503 else {
17504 return tmp;
17505 }
17506}
17507static VALUE
17508vm_check_match(rb_execution_context_t *ec, VALUE target, VALUE pattern, rb_num_t flag)
17509{
17510 enum vm_check_match_type type = ((int)flag) & 0x03;
17511 if (flag & 0x04) {
17512 long i;
17513 const long n = rb_array_len(pattern);
17514 for (i = 0; i < n; i++) {
17515 VALUE v = RARRAY_AREF(pattern, i);
17516 VALUE c = check_match(ec, v, target, type);
17517 if (RB_TEST(c)) {
17518 return c;
17519 }
17520 }
17521 return ((VALUE)RUBY_Qfalse);
17522 }
17523 else {
17524 return check_match(ec, pattern, target, type);
17525 }
17526}
17527static VALUE
17528vm_check_keyword(lindex_t bits, lindex_t idx, const VALUE *ep)
17529{
17530 const VALUE kw_bits = *(ep - bits);
17531 if (RB_FIXNUM_P(kw_bits)) {
17532 unsigned int b = (unsigned int)rb_fix2ulong(kw_bits);
17533 if ((idx < (32-1)) && (b & (0x01 << idx)))
17534 return ((VALUE)RUBY_Qfalse);
17535 }
17536 else {
17537 ((void)0);
17538 if (rb_hash_has_key(kw_bits, __builtin_choose_expr( __builtin_constant_p(idx), ((VALUE)(idx)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(idx)))) return ((VALUE)RUBY_Qfalse);
17539 }
17540 return ((VALUE)RUBY_Qtrue);
17541}
17542static void
17543vm_dtrace(rb_event_flag_t flag, rb_execution_context_t *ec)
17544{
17545 if (0 ||
17546 0 ||
17547 0 ||
17548 0) {
17549 switch (flag) {
17550 case 0x0008:
17551 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
17552 return;
17553 case 0x0020:
17554 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
17555 return;
17556 case 0x0010:
17557 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
17558 return;
17559 case 0x0040:
17560 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
17561 return;
17562 }
17563 }
17564}
17565static VALUE
17566vm_const_get_under(ID id, rb_num_t flags, VALUE cbase)
17567{
17568 VALUE ns;
17569 if ((ns = vm_search_const_defined_class(cbase, id)) == 0) {
17570 return ns;
17571 }
17572 else if (((flags) & 0x08)) {
17573 return rb_public_const_get_at(ns, id);
17574 }
17575 else {
17576 return rb_const_get_at(ns, id);
17577 }
17578}
17579static VALUE
17580vm_check_if_class(ID id, rb_num_t flags, VALUE super, VALUE klass)
17581{
17582 if (!RB_TYPE_P(klass, RUBY_T_CLASS)) {
17583 return 0;
17584 }
17585 else if (((flags) & 0x10)) {
17586 VALUE tmp = rb_class_real(RCLASS_SUPER(klass));
17587 if (tmp != super) {
17588 rb_raise(rb_eTypeError,
17589 "superclass mismatch for class %""l""i" "\v""",
17590 rb_id2str(id));
17591 }
17592 else {
17593 return klass;
17594 }
17595 }
17596 else {
17597 return klass;
17598 }
17599}
17600static VALUE
17601vm_check_if_module(ID id, VALUE mod)
17602{
17603 if (!RB_TYPE_P(mod, RUBY_T_MODULE)) {
17604 return 0;
17605 }
17606 else {
17607 return mod;
17608 }
17609}
17610static VALUE
17611declare_under(ID id, VALUE cbase, VALUE c)
17612{
17613 rb_set_class_path_string(c, cbase, rb_id2str(id));
17614 rb_const_set(cbase, id, c);
17615 return c;
17616}
17617static VALUE
17618vm_declare_class(ID id, rb_num_t flags, VALUE cbase, VALUE super)
17619{
17620 VALUE s = ((flags) & 0x10) ? super : rb_cObject;
17621 VALUE c = declare_under(id, cbase, rb_define_class_id(id, s));
17623 rb_class_inherited(s, c);
17624 return c;
17625}
17626static VALUE
17627vm_declare_module(ID id, VALUE cbase)
17628{
17629 return declare_under(id, cbase, rb_module_new());
17630}
17631__attribute__((__noreturn__)) static void unmatched_redefinition(const char *type, VALUE cbase, ID id, VALUE old);
17632static void
17633unmatched_redefinition(const char *type, VALUE cbase, ID id, VALUE old)
17634{
17635 VALUE name = rb_id2str(id);
17636 VALUE message = rb_sprintf("%""l""i" "\v"" is not a %s",
17637 name, type);
17638 VALUE location = rb_const_source_location_at(cbase, id);
17639 if (!RB_NIL_P(location)) {
17640 rb_str_catf(message, "\n%""l""i" "\v"":%""l""i" "\v"":"
17641 " previous definition of %""l""i" "\v"" was here",
17642 rb_ary_entry(location, 0), rb_ary_entry(location, 1), name);
17643 }
17644 rb_exc_raise(rb_exc_new_str(rb_eTypeError, message));
17645}
17646static VALUE
17647vm_define_class(ID id, rb_num_t flags, VALUE cbase, VALUE super)
17648{
17649 VALUE klass;
17650 if (((flags) & 0x10) && !RB_TYPE_P(super, RUBY_T_CLASS)) {
17651 rb_raise(rb_eTypeError,
17652 "superclass must be an instance of Class (given an instance of %""l""i" "\v"")",
17653 rb_obj_class(super));
17654 }
17655 vm_check_if_namespace(cbase);
17656 rb_autoload_load(cbase, id);
17657 if ((klass = vm_const_get_under(id, flags, cbase)) != 0) {
17658 if (!vm_check_if_class(id, flags, super, klass))
17659 unmatched_redefinition("class", cbase, id, klass);
17660 return klass;
17661 }
17662 else {
17663 return vm_declare_class(id, flags, cbase, super);
17664 }
17665}
17666static VALUE
17667vm_define_module(ID id, rb_num_t flags, VALUE cbase)
17668{
17669 VALUE mod;
17670 vm_check_if_namespace(cbase);
17671 if ((mod = vm_const_get_under(id, flags, cbase)) != 0) {
17672 if (!vm_check_if_module(id, mod))
17673 unmatched_redefinition("module", cbase, id, mod);
17674 return mod;
17675 }
17676 else {
17677 return vm_declare_module(id, cbase);
17678 }
17679}
17680static VALUE
17681vm_find_or_create_class_by_id(ID id,
17682 rb_num_t flags,
17683 VALUE cbase,
17684 VALUE super)
17685{
17686 rb_vm_defineclass_type_t type = ((rb_vm_defineclass_type_t)(flags) & VM_DEFINECLASS_TYPE_MASK);
17687 switch (type) {
17688 case VM_DEFINECLASS_TYPE_CLASS:
17689 return vm_define_class(id, flags, cbase, super);
17690 case VM_DEFINECLASS_TYPE_SINGLETON_CLASS:
17691 return rb_singleton_class(cbase);
17692 case VM_DEFINECLASS_TYPE_MODULE:
17693 return vm_define_module(id, flags, cbase);
17694 default:
17695 rb_bug("unknown defineclass type: %d", (int)type);
17696 }
17697}
17698static rb_method_visibility_t
17699vm_scope_visibility_get(const rb_execution_context_t *ec)
17700{
17701 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
17702 if (!vm_env_cref_by_cref(cfp->ep)) {
17703 return METHOD_VISI_PUBLIC;
17704 }
17705 else {
17706 return CREF_SCOPE_VISI(vm_ec_cref(ec))->method_visi;
17707 }
17708}
17709static int
17710vm_scope_module_func_check(const rb_execution_context_t *ec)
17711{
17712 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
17713 if (!vm_env_cref_by_cref(cfp->ep)) {
17714 return 0;
17715 }
17716 else {
17717 return CREF_SCOPE_VISI(vm_ec_cref(ec))->module_func;
17718 }
17719}
17720static void
17721vm_define_method(const rb_execution_context_t *ec, VALUE obj, ID id, VALUE iseqval, int is_singleton)
17722{
17723 VALUE klass;
17724 rb_method_visibility_t visi;
17725 rb_cref_t *cref = vm_ec_cref(ec);
17726 if (!is_singleton) {
17727 klass = CREF_CLASS(cref);
17728 visi = vm_scope_visibility_get(ec);
17729 }
17730 else {
17731 klass = rb_singleton_class(obj);
17732 visi = METHOD_VISI_PUBLIC;
17733 }
17734 if (RB_NIL_P(klass)) {
17735 rb_raise(rb_eTypeError, "no class/module to add method");
17736 }
17737 rb_add_method_iseq(klass, id, (const rb_iseq_t *)iseqval, cref, visi);
17738 if (!is_singleton && vm_scope_module_func_check(ec)) {
17739 klass = rb_singleton_class(klass);
17740 rb_add_method_iseq(klass, id, (const rb_iseq_t *)iseqval, cref, METHOD_VISI_PUBLIC);
17741 }
17742}
17743static VALUE
17744vm_invokeblock_i(struct rb_execution_context_struct *ec,
17745 struct rb_control_frame_struct *reg_cfp,
17746 struct rb_calling_info *calling)
17747{
17748 const struct rb_callinfo *ci = calling->ci;
17749 VALUE block_handler = VM_CF_BLOCK_HANDLER((((reg_cfp))));
17750 if (block_handler == 0) {
17751 rb_vm_localjump_error("no block given (yield)", ((VALUE)RUBY_Qnil), 0);
17752 }
17753 else {
17754 return vm_invoke_block(ec, (((reg_cfp))), calling, ci, 0, block_handler);
17755 }
17756}
17757static const struct rb_callcache *
17758vm_search_method_wrap(const struct rb_control_frame_struct *reg_cfp, struct rb_call_data *cd, VALUE recv)
17759{
17760 return vm_search_method((VALUE)reg_cfp->iseq, cd, recv);
17761}
17762static const struct rb_callcache *
17763vm_search_invokeblock(const struct rb_control_frame_struct *reg_cfp, struct rb_call_data *cd, VALUE recv)
17764{
17765 static const struct rb_callcache cc = {
17766 .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4),
17767 .klass = 0,
17768 .cme_ = 0,
17769 .call_ = vm_invokeblock_i,
17770 .aux_ = {0},
17771 };
17772 return &cc;
17773}
17774static
17775VALUE
17776vm_sendish(
17777 struct rb_execution_context_struct *ec,
17778 struct rb_control_frame_struct *reg_cfp,
17779 struct rb_call_data *cd,
17780 VALUE block_handler,
17781 const struct rb_callcache *(*method_explorer)(const struct rb_control_frame_struct *cfp, struct rb_call_data *cd, VALUE recv)
17782) {
17783 VALUE val;
17784 const struct rb_callinfo *ci = cd->ci;
17785 const struct rb_callcache *cc;
17786 int argc = vm_ci_argc(ci);
17787 VALUE recv = (*(((((reg_cfp)->sp)))-(argc)-1));
17788 struct rb_calling_info calling = {
17789 .block_handler = block_handler,
17790 .kw_splat = (vm_ci_flag(ci) & (0x01 << VM_CALL_KW_SPLAT_bit)) > 0,
17791 .recv = recv,
17792 .argc = argc,
17793 .ci = ci,
17794 };
17795 calling.cc = cc = method_explorer((((reg_cfp))), cd, recv);
17796 val = vm_cc_call(cc)(ec, (((reg_cfp))), &calling);
17797 if (val != ((VALUE)RUBY_Qundef)) {
17798 return val;
17799 }
17800 else {
17801 do { (reg_cfp) = ec->cfp; } while (0);
17802 }
17803 if (((((reg_cfp)))->iseq)->body->catch_except_p) {
17804 VM_ENV_FLAGS_SET(((((reg_cfp)->ep))), VM_FRAME_FLAG_FINISH);
17805 return rb_vm_exec(ec, 1);
17806 }
17807 else if ((val = mjit_exec(ec)) == ((VALUE)RUBY_Qundef)) {
17808 VM_ENV_FLAGS_SET(((((reg_cfp)->ep))), VM_FRAME_FLAG_FINISH);
17809 return rb_vm_exec(ec, 0);
17810 }
17811 else {
17812 return val;
17813 }
17814}
17815static VALUE
17816vm_opt_str_freeze(VALUE str, int bop, ID id)
17817{
17818 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 2))) == 0), 1)))) {
17819 return str;
17820 }
17821 else {
17822 return ((VALUE)RUBY_Qundef);
17823 }
17824}
17825static VALUE
17826vm_opt_newarray_max(rb_num_t num, const VALUE *ptr)
17827{
17828 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MAX)]&((1 << 3))) == 0), 1)))) {
17829 if (num == 0) {
17830 return ((VALUE)RUBY_Qnil);
17831 }
17832 else {
17833 struct cmp_opt_data cmp_opt = { 0, 0 };
17834 VALUE result = *ptr;
17835 rb_snum_t i = num - 1;
17836 while (i-- > 0) {
17837 const VALUE v = *++ptr;
17838 if (((RB_FIXNUM_P(v) && RB_FIXNUM_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Integer)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Integer)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Integer)), rb_method_basic_definition_p(rb_cInteger, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Integer))))) ? (((long)v > (long)result) ? 1 : ((long)v < (long)result) ? -1 : 0) : ((RB_TYPE_P((v), RUBY_T_STRING) && rb_class_of(v) == rb_cString) && (RB_TYPE_P((result), RUBY_T_STRING) && rb_class_of(result) == rb_cString) && (((cmp_opt).opt_inited & (1U << cmp_opt_String)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_String)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_String)), rb_method_basic_definition_p(rb_cString, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_String))))) ? rb_str_cmp(v, result) : (RB_FLOAT_TYPE_P(v) && RB_FLOAT_TYPE_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Float)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Float)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Float)), rb_method_basic_definition_p(rb_cFloat, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Float))))) ? rb_float_cmp(v, result) : rb_cmpint(rb_funcallv(v, idCmp, 1, &result), v, result)) > 0) {
17839 result = v;
17840 }
17841 }
17842 return result;
17843 }
17844 }
17845 else {
17846 VALUE ary = rb_ary_new_from_values(num, ptr);
17847 return __extension__({ const int rb_funcall_argc = (0); const VALUE rb_funcall_args[] = {}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); rb_funcallv(ary, idMax, __builtin_choose_expr(__builtin_constant_p(rb_funcall_argc), (((rb_funcall_argc) == 0 ? (rb_funcall_nargs) <= 1 : (rb_funcall_argc) == (rb_funcall_nargs)) ? (rb_funcall_argc) : rb_varargs_bad_length(rb_funcall_argc, rb_funcall_nargs)), (((rb_funcall_argc) <= (rb_funcall_nargs)) ? (rb_funcall_argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", rb_funcall_argc, rb_funcall_nargs), 0))), rb_funcall_nargs ? rb_funcall_args : ((void *)0)); });
17848 }
17849}
17850static VALUE
17851vm_opt_newarray_min(rb_num_t num, const VALUE *ptr)
17852{
17853 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MIN)]&((1 << 3))) == 0), 1)))) {
17854 if (num == 0) {
17855 return ((VALUE)RUBY_Qnil);
17856 }
17857 else {
17858 struct cmp_opt_data cmp_opt = { 0, 0 };
17859 VALUE result = *ptr;
17860 rb_snum_t i = num - 1;
17861 while (i-- > 0) {
17862 const VALUE v = *++ptr;
17863 if (((RB_FIXNUM_P(v) && RB_FIXNUM_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Integer)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Integer)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Integer)), rb_method_basic_definition_p(rb_cInteger, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Integer))))) ? (((long)v > (long)result) ? 1 : ((long)v < (long)result) ? -1 : 0) : ((RB_TYPE_P((v), RUBY_T_STRING) && rb_class_of(v) == rb_cString) && (RB_TYPE_P((result), RUBY_T_STRING) && rb_class_of(result) == rb_cString) && (((cmp_opt).opt_inited & (1U << cmp_opt_String)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_String)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_String)), rb_method_basic_definition_p(rb_cString, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_String))))) ? rb_str_cmp(v, result) : (RB_FLOAT_TYPE_P(v) && RB_FLOAT_TYPE_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Float)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Float)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Float)), rb_method_basic_definition_p(rb_cFloat, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Float))))) ? rb_float_cmp(v, result) : rb_cmpint(rb_funcallv(v, idCmp, 1, &result), v, result)) < 0) {
17864 result = v;
17865 }
17866 }
17867 return result;
17868 }
17869 }
17870 else {
17871 VALUE ary = rb_ary_new_from_values(num, ptr);
17872 return __extension__({ const int rb_funcall_argc = (0); const VALUE rb_funcall_args[] = {}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); rb_funcallv(ary, idMin, __builtin_choose_expr(__builtin_constant_p(rb_funcall_argc), (((rb_funcall_argc) == 0 ? (rb_funcall_nargs) <= 1 : (rb_funcall_argc) == (rb_funcall_nargs)) ? (rb_funcall_argc) : rb_varargs_bad_length(rb_funcall_argc, rb_funcall_nargs)), (((rb_funcall_argc) <= (rb_funcall_nargs)) ? (rb_funcall_argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", rb_funcall_argc, rb_funcall_nargs), 0))), rb_funcall_nargs ? rb_funcall_args : ((void *)0)); });
17873 }
17874}
17875static inline _Bool
17876vm_inlined_ic_hit_p(VALUE flags, VALUE value, const rb_cref_t *ic_cref, rb_serial_t ic_serial, const VALUE *reg_ep)
17877{
17878 if (ic_serial == (ruby_vm_global_constant_state) &&
17879 ((flags & ((VALUE)RUBY_FL_USER4)) || rb_ractor_main_p())) {
17880 ((void)0);
17881 return (ic_cref == ((void *)0) ||
17882 ic_cref == vm_get_cref(reg_ep));
17883 }
17884 return 0;
17885}
17886static _Bool
17887vm_ic_hit_p(const struct iseq_inline_constant_cache_entry *ice, const VALUE *reg_ep)
17888{
17889 ((void)0);
17890 return vm_inlined_ic_hit_p(ice->flags, ice->value, ice->ic_cref, ice->ic_serial, reg_ep);
17891}
17892COLDFUNC static void
17893vm_ic_update(const rb_iseq_t *iseq, IC ic, VALUE val, const VALUE *reg_ep) {
17894 struct iseq_inline_constant_cache_entry *ice = (struct iseq_inline_constant_cache_entry *)rb_imemo_new(imemo_constcache, 0, 0, 0, 0);
17895 rb_obj_write((VALUE)(ice), __extension__({
17896 ;
17897 ; __typeof__((VALUE *)(&ice->value)) unaligned_member_access_result = ((VALUE *)(&ice->value));
17898 ; unaligned_member_access_result; }), (VALUE)(val), "./vm_insnhelper.c", 4672);
17899 ice->ic_cref = vm_get_const_key_cref(reg_ep);
17900 ice->ic_serial = (ruby_vm_global_constant_state) - ruby_vm_const_missing_count;
17901 if (rb_ractor_shareable_p(val)) ice->flags |= ((VALUE)RUBY_FL_USER4);
17902 ruby_vm_const_missing_count = 0;
17903 rb_obj_write((VALUE)(iseq), __extension__({
17904 ;
17905 ; __typeof__((VALUE *)(&ic->entry)) unaligned_member_access_result = ((VALUE *)(&ic->entry));
17906 ; unaligned_member_access_result; }), (VALUE)(ice), "./vm_insnhelper.c", 4677);
17907}
17908static VALUE
17909vm_once_dispatch(rb_execution_context_t *ec, ISEQ iseq, ISE is)
17910{
17911 rb_thread_t *th = rb_ec_thread_ptr(ec);
17912 rb_thread_t *const RUNNING_THREAD_ONCE_DONE = (rb_thread_t *)(0x1);
17913 again:
17914 if (is->once.running_thread == RUNNING_THREAD_ONCE_DONE) {
17915 return is->once.value;
17916 }
17917 else if (is->once.running_thread == ((void *)0)) {
17918 VALUE val;
17919 is->once.running_thread = th;
17920 val = rb_ensure(vm_once_exec, (VALUE)iseq, vm_once_clear, (VALUE)is);
17921 rb_obj_write((VALUE)(ec->cfp->iseq), __extension__({
17922;
17923; __typeof__((VALUE *)(&is->once.value)) unaligned_member_access_result = ((VALUE *)(&is->once.value));
17924; unaligned_member_access_result; }), (VALUE)(val), "./vm_insnhelper.c", 4694);
17925 is->once.running_thread = RUNNING_THREAD_ONCE_DONE;
17926 return val;
17927 }
17928 else if (is->once.running_thread == th) {
17929 return vm_once_exec((VALUE)iseq);
17930 }
17931 else {
17932 rb_vm_check_ints(ec);
17934 goto again;
17935 }
17936}
17937static OFFSET
17938vm_case_dispatch(CDHASH hash, OFFSET else_offset, VALUE key)
17939{
17940 switch (__extension__({ VALUE arg_obj = (key); RB_SPECIAL_CONST_P(arg_obj) ? -1 : (int)RB_BUILTIN_TYPE(arg_obj); })) {
17941 case -1:
17942 case RUBY_T_FLOAT:
17943 case RUBY_T_SYMBOL:
17944 case RUBY_T_BIGNUM:
17945 case RUBY_T_STRING:
17946 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQQ)]&((1 << 6) | (1 << 0) | (1 << 1) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 2))) == 0), 1)))) {
17947 st_data_t val;
17948 if (RB_FLOAT_TYPE_P(key)) {
17949 double kval = rb_float_value_inline(key);
17950 if (!__builtin_isinf_sign (kval) && modf(kval, &kval) == 0.0) {
17951 key = (((kval) < (0x7fffffffffffffffL / 2) + 1) && ((kval) >= ((-0x7fffffffffffffffL - 1L) / 2))) ? RB_INT2FIX((long)kval) : rb_dbl2big(kval);
17952 }
17953 }
17954 if (rb_hash_stlike_lookup(hash, key, &val)) {
17955 return rb_fix2long((VALUE)val);
17956 }
17957 else {
17958 return else_offset;
17959 }
17960 }
17961 }
17962 return 0;
17963}
17964__attribute__((__noreturn__)) static void vm_stack_consistency_error(const rb_execution_context_t *ec, const rb_control_frame_t *, const VALUE *);
17965static void
17966vm_stack_consistency_error(const rb_execution_context_t *ec,
17967 const rb_control_frame_t *cfp,
17968 const VALUE *bp)
17969{
17970 const ptrdiff_t nsp = ((cfp->sp) - (ec)->vm_stack);
17971 const ptrdiff_t nbp = ((bp) - (ec)->vm_stack);
17972 static const char stack_consistency_error[] =
17973 "Stack consistency error (sp: %""t""d"", bp: %""t""d"")";
17974 rb_bug(stack_consistency_error, nsp, nbp);
17975}
17976ALWAYS_INLINE(static inline VALUE
17977vm_opt_plus(VALUE recv, VALUE obj));
17978static inline VALUE
17979vm_opt_plus(VALUE recv, VALUE obj) {
17980 if (FIXNUM_2_P(recv, obj) &&
17981 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 0))) == 0), 1)))) {
17982 return rb_fix_plus_fix(recv, obj);
17983 }
17984 else if (FLONUM_2_P(recv, obj) &&
17985 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 1))) == 0), 1)))) {
17986 return rb_float_new_inline(rb_float_value_inline(recv) + rb_float_value_inline(obj));
17987 }
17988 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
17989 return ((VALUE)RUBY_Qundef);
17990 }
17991 else if (RBASIC_CLASS(recv) == rb_cFloat &&
17992 RBASIC_CLASS(obj) == rb_cFloat &&
17993 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 1))) == 0), 1)))) {
17994 return rb_float_new_inline(rb_float_value_inline(recv) + rb_float_value_inline(obj));
17995 }
17996 else if (RBASIC_CLASS(recv) == rb_cString &&
17997 RBASIC_CLASS(obj) == rb_cString &&
17998 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 2))) == 0), 1)))) {
17999 return rb_str_opt_plus(recv, obj);
18000 }
18001 else if (RBASIC_CLASS(recv) == rb_cArray &&
18002 RBASIC_CLASS(obj) == rb_cArray &&
18003 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 3))) == 0), 1)))) {
18004 return rb_ary_plus(recv, obj);
18005 }
18006 else {
18007 return ((VALUE)RUBY_Qundef);
18008 }
18009}
18010ALWAYS_INLINE(static inline VALUE
18011vm_opt_minus(VALUE recv, VALUE obj));
18012static inline VALUE
18013vm_opt_minus(VALUE recv, VALUE obj) {
18014 if (FIXNUM_2_P(recv, obj) &&
18015 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 0))) == 0), 1)))) {
18016 return rb_fix_minus_fix(recv, obj);
18017 }
18018 else if (FLONUM_2_P(recv, obj) &&
18019 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 1))) == 0), 1)))) {
18020 return rb_float_new_inline(rb_float_value_inline(recv) - rb_float_value_inline(obj));
18021 }
18022 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
18023 return ((VALUE)RUBY_Qundef);
18024 }
18025 else if (RBASIC_CLASS(recv) == rb_cFloat &&
18026 RBASIC_CLASS(obj) == rb_cFloat &&
18027 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 1))) == 0), 1)))) {
18028 return rb_float_new_inline(rb_float_value_inline(recv) - rb_float_value_inline(obj));
18029 }
18030 else {
18031 return ((VALUE)RUBY_Qundef);
18032 }
18033}
18034ALWAYS_INLINE(static inline VALUE
18035vm_opt_mult(VALUE recv, VALUE obj));
18036static inline VALUE
18037vm_opt_mult(VALUE recv, VALUE obj) {
18038 if (FIXNUM_2_P(recv, obj) &&
18039 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 0))) == 0), 1)))) {
18040 return rb_fix_mul_fix(recv, obj);
18041 }
18042 else if (FLONUM_2_P(recv, obj) &&
18043 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 1))) == 0), 1)))) {
18044 return rb_float_new_inline(rb_float_value_inline(recv) * rb_float_value_inline(obj));
18045 }
18046 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
18047 return ((VALUE)RUBY_Qundef);
18048 }
18049 else if (RBASIC_CLASS(recv) == rb_cFloat &&
18050 RBASIC_CLASS(obj) == rb_cFloat &&
18051 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 1))) == 0), 1)))) {
18052 return rb_float_new_inline(rb_float_value_inline(recv) * rb_float_value_inline(obj));
18053 }
18054 else {
18055 return ((VALUE)RUBY_Qundef);
18056 }
18057}
18058ALWAYS_INLINE(static inline VALUE
18059vm_opt_div(VALUE recv, VALUE obj));
18060static inline VALUE
18061vm_opt_div(VALUE recv, VALUE obj) {
18062 if (FIXNUM_2_P(recv, obj) &&
18063 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 0))) == 0), 1)))) {
18064 return (rb_fix2long(obj) == 0) ? ((VALUE)RUBY_Qundef) : rb_fix_div_fix(recv, obj);
18065 }
18066 else if (FLONUM_2_P(recv, obj) &&
18067 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 1))) == 0), 1)))) {
18068 return rb_flo_div_flo(recv, obj);
18069 }
18070 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
18071 return ((VALUE)RUBY_Qundef);
18072 }
18073 else if (RBASIC_CLASS(recv) == rb_cFloat &&
18074 RBASIC_CLASS(obj) == rb_cFloat &&
18075 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 1))) == 0), 1)))) {
18076 return rb_flo_div_flo(recv, obj);
18077 }
18078 else {
18079 return ((VALUE)RUBY_Qundef);
18080 }
18081}
18082ALWAYS_INLINE(static inline VALUE
18083vm_opt_mod(VALUE recv, VALUE obj));
18084static inline VALUE
18085vm_opt_mod(VALUE recv, VALUE obj) {
18086 if (FIXNUM_2_P(recv, obj) &&
18087 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 0))) == 0), 1)))) {
18088 return (rb_fix2long(obj) == 0) ? ((VALUE)RUBY_Qundef) : rb_fix_mod_fix(recv, obj);
18089 }
18090 else if (FLONUM_2_P(recv, obj) &&
18091 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 1))) == 0), 1)))) {
18092 return rb_float_new_inline(ruby_float_mod(rb_float_value_inline(recv), rb_float_value_inline(obj)));
18093 }
18094 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
18095 return ((VALUE)RUBY_Qundef);
18096 }
18097 else if (RBASIC_CLASS(recv) == rb_cFloat &&
18098 RBASIC_CLASS(obj) == rb_cFloat &&
18099 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 1))) == 0), 1)))) {
18100 return rb_float_new_inline(ruby_float_mod(rb_float_value_inline(recv), rb_float_value_inline(obj)));
18101 }
18102 else {
18103 return ((VALUE)RUBY_Qundef);
18104 }
18105}
18106ALWAYS_INLINE(static inline VALUE
18107vm_opt_neq(const rb_iseq_t *iseq, CALL_DATA cd, CALL_DATA cd_eq, VALUE recv, VALUE obj));
18108static inline VALUE
18109vm_opt_neq(const rb_iseq_t *iseq, CALL_DATA cd, CALL_DATA cd_eq, VALUE recv, VALUE obj) {
18110 if (vm_method_cfunc_is(iseq, cd, recv, rb_obj_not_equal)) {
18111 VALUE val = opt_equality(iseq, recv, obj, cd_eq);
18112 if (val != ((VALUE)RUBY_Qundef)) {
18113 return RB_TEST(val) ? ((VALUE)RUBY_Qfalse) : ((VALUE)RUBY_Qtrue);
18114 }
18115 }
18116 return ((VALUE)RUBY_Qundef);
18117}
18118ALWAYS_INLINE(static inline VALUE
18119vm_opt_lt(VALUE recv, VALUE obj));
18120static inline VALUE
18121vm_opt_lt(VALUE recv, VALUE obj) {
18122 if (FIXNUM_2_P(recv, obj) &&
18123 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 0))) == 0), 1)))) {
18124 return (long)recv < (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
18125 }
18126 else if (FLONUM_2_P(recv, obj) &&
18127 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 1))) == 0), 1)))) {
18128 return rb_float_value_inline(recv) < rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
18129 }
18130 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
18131 return ((VALUE)RUBY_Qundef);
18132 }
18133 else if (RBASIC_CLASS(recv) == rb_cFloat &&
18134 RBASIC_CLASS(obj) == rb_cFloat &&
18135 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 1))) == 0), 1)))) {
18136 ;
18137 return rb_float_value_inline(recv) < rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
18138 }
18139 else {
18140 return ((VALUE)RUBY_Qundef);
18141 }
18142}
18143ALWAYS_INLINE(static inline VALUE
18144vm_opt_le(VALUE recv, VALUE obj));
18145static inline VALUE
18146vm_opt_le(VALUE recv, VALUE obj) {
18147 if (FIXNUM_2_P(recv, obj) &&
18148 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 0))) == 0), 1)))) {
18149 return (long)recv <= (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
18150 }
18151 else if (FLONUM_2_P(recv, obj) &&
18152 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 1))) == 0), 1)))) {
18153 return rb_float_value_inline(recv) <= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
18154 }
18155 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
18156 return ((VALUE)RUBY_Qundef);
18157 }
18158 else if (RBASIC_CLASS(recv) == rb_cFloat &&
18159 RBASIC_CLASS(obj) == rb_cFloat &&
18160 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 1))) == 0), 1)))) {
18161 ;
18162 return rb_float_value_inline(recv) <= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
18163 }
18164 else {
18165 return ((VALUE)RUBY_Qundef);
18166 }
18167}
18168ALWAYS_INLINE(static inline VALUE
18169vm_opt_gt(VALUE recv, VALUE obj));
18170static inline VALUE
18171vm_opt_gt(VALUE recv, VALUE obj) {
18172 if (FIXNUM_2_P(recv, obj) &&
18173 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 0))) == 0), 1)))) {
18174 return (long)recv > (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
18175 }
18176 else if (FLONUM_2_P(recv, obj) &&
18177 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 1))) == 0), 1)))) {
18178 return rb_float_value_inline(recv) > rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
18179 }
18180 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
18181 return ((VALUE)RUBY_Qundef);
18182 }
18183 else if (RBASIC_CLASS(recv) == rb_cFloat &&
18184 RBASIC_CLASS(obj) == rb_cFloat &&
18185 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 1))) == 0), 1)))) {
18186 ;
18187 return rb_float_value_inline(recv) > rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
18188 }
18189 else {
18190 return ((VALUE)RUBY_Qundef);
18191 }
18192}
18193ALWAYS_INLINE(static inline VALUE
18194vm_opt_ge(VALUE recv, VALUE obj));
18195static inline VALUE
18196vm_opt_ge(VALUE recv, VALUE obj) {
18197 if (FIXNUM_2_P(recv, obj) &&
18198 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 0))) == 0), 1)))) {
18199 return (long)recv >= (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
18200 }
18201 else if (FLONUM_2_P(recv, obj) &&
18202 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 1))) == 0), 1)))) {
18203 return rb_float_value_inline(recv) >= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
18204 }
18205 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
18206 return ((VALUE)RUBY_Qundef);
18207 }
18208 else if (RBASIC_CLASS(recv) == rb_cFloat &&
18209 RBASIC_CLASS(obj) == rb_cFloat &&
18210 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 1))) == 0), 1)))) {
18211 ;
18212 return rb_float_value_inline(recv) >= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
18213 }
18214 else {
18215 return ((VALUE)RUBY_Qundef);
18216 }
18217}
18218ALWAYS_INLINE(static inline VALUE
18219vm_opt_ltlt(VALUE recv, VALUE obj));
18220static inline VALUE
18221vm_opt_ltlt(VALUE recv, VALUE obj) {
18222 if (RB_SPECIAL_CONST_P(recv)) {
18223 return ((VALUE)RUBY_Qundef);
18224 }
18225 else if (RBASIC_CLASS(recv) == rb_cString &&
18226 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LTLT)]&((1 << 2))) == 0), 1)))) {
18227 return rb_str_concat(recv, obj);
18228 }
18229 else if (RBASIC_CLASS(recv) == rb_cArray &&
18230 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LTLT)]&((1 << 3))) == 0), 1)))) {
18231 return rb_ary_push(recv, obj);
18232 }
18233 else {
18234 return ((VALUE)RUBY_Qundef);
18235 }
18236}
18237ALWAYS_INLINE(static inline VALUE
18238vm_opt_and(VALUE recv, VALUE obj));
18239static inline VALUE
18240vm_opt_and(VALUE recv, VALUE obj) {
18241 if (FIXNUM_2_P(recv, obj) &&
18242 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AND)]&((1 << 0))) == 0), 1)))) {
18243 return (recv & obj) | 1;
18244 }
18245 else {
18246 return ((VALUE)RUBY_Qundef);
18247 }
18248}
18249ALWAYS_INLINE(static inline VALUE
18250vm_opt_or(VALUE recv, VALUE obj));
18251static inline VALUE
18252vm_opt_or(VALUE recv, VALUE obj) {
18253 if (FIXNUM_2_P(recv, obj) &&
18254 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_OR)]&((1 << 0))) == 0), 1)))) {
18255 return recv | obj;
18256 }
18257 else {
18258 return ((VALUE)RUBY_Qundef);
18259 }
18260}
18261ALWAYS_INLINE(static inline VALUE
18262vm_opt_aref(VALUE recv, VALUE obj));
18263static inline VALUE
18264vm_opt_aref(VALUE recv, VALUE obj) {
18265 if (RB_SPECIAL_CONST_P(recv)) {
18266 if (FIXNUM_2_P(recv, obj) &&
18267 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 0))) == 0), 1)))) {
18268 return rb_fix_aref(recv, obj);
18269 }
18270 return ((VALUE)RUBY_Qundef);
18271 }
18272 else if (RBASIC_CLASS(recv) == rb_cArray &&
18273 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 3))) == 0), 1)))) {
18274 if (RB_FIXNUM_P(obj)) {
18275 return rb_ary_entry_internal(recv, rb_fix2long(obj));
18276 }
18277 else {
18278 return rb_ary_aref1(recv, obj);
18279 }
18280 }
18281 else if (RBASIC_CLASS(recv) == rb_cHash &&
18282 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 4))) == 0), 1)))) {
18283 return rb_hash_aref(recv, obj);
18284 }
18285 else {
18286 return ((VALUE)RUBY_Qundef);
18287 }
18288}
18289ALWAYS_INLINE(static inline VALUE
18290vm_opt_aset(VALUE recv, VALUE obj, VALUE set));
18291static inline VALUE
18292vm_opt_aset(VALUE recv, VALUE obj, VALUE set) {
18293 if (RB_SPECIAL_CONST_P(recv)) {
18294 return ((VALUE)RUBY_Qundef);
18295 }
18296 else if (RBASIC_CLASS(recv) == rb_cArray &&
18297 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 3))) == 0), 1))) &&
18298 RB_FIXNUM_P(obj)) {
18299 rb_ary_store(recv, rb_fix2long(obj), set);
18300 return set;
18301 }
18302 else if (RBASIC_CLASS(recv) == rb_cHash &&
18303 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 4))) == 0), 1)))) {
18304 rb_hash_aset(recv, obj, set);
18305 return set;
18306 }
18307 else {
18308 return ((VALUE)RUBY_Qundef);
18309 }
18310}
18311ALWAYS_INLINE(static inline VALUE
18312vm_opt_aref_with(VALUE recv, VALUE key));
18313static inline VALUE
18314vm_opt_aref_with(VALUE recv, VALUE key) {
18315 if (!RB_SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
18316 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 4))) == 0), 1))) &&
18317 rb_hash_compare_by_id_p(recv) == ((VALUE)RUBY_Qfalse)) {
18318 return rb_hash_aref(recv, key);
18319 }
18320 else {
18321 return ((VALUE)RUBY_Qundef);
18322 }
18323}
18324ALWAYS_INLINE(static inline VALUE
18325vm_opt_aset_with(VALUE recv, VALUE key, VALUE val));
18326static inline VALUE
18327vm_opt_aset_with(VALUE recv, VALUE key, VALUE val) {
18328 if (!RB_SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
18329 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 4))) == 0), 1))) &&
18330 rb_hash_compare_by_id_p(recv) == ((VALUE)RUBY_Qfalse)) {
18331 return rb_hash_aset(recv, key, val);
18332 }
18333 else {
18334 return ((VALUE)RUBY_Qundef);
18335 }
18336}
18337static VALUE
18338vm_opt_length(VALUE recv, int bop)
18339{
18340 if (RB_SPECIAL_CONST_P(recv)) {
18341 return ((VALUE)RUBY_Qundef);
18342 }
18343 else if (RBASIC_CLASS(recv) == rb_cString &&
18344 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 2))) == 0), 1)))) {
18345 if (bop == BOP_EMPTY_P) {
18346 return rb_long2num_inline(RSTRING_LEN(recv));
18347 }
18348 else {
18349 return rb_str_length(recv);
18350 }
18351 }
18352 else if (RBASIC_CLASS(recv) == rb_cArray &&
18353 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 3))) == 0), 1)))) {
18354 return rb_long2num_inline(rb_array_len(recv));
18355 }
18356 else if (RBASIC_CLASS(recv) == rb_cHash &&
18357 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 4))) == 0), 1)))) {
18358 return __builtin_choose_expr( __builtin_constant_p(RHASH_SIZE(recv)), ((VALUE)(RHASH_SIZE(recv))) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(RHASH_SIZE(recv)));
18359 }
18360 else {
18361 return ((VALUE)RUBY_Qundef);
18362 }
18363}
18364static VALUE
18365vm_opt_empty_p(VALUE recv)
18366{
18367 switch (vm_opt_length(recv, BOP_EMPTY_P)) {
18368 case ((VALUE)RUBY_Qundef): return ((VALUE)RUBY_Qundef);
18369 case __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0)): return ((VALUE)RUBY_Qtrue);
18370 default: return ((VALUE)RUBY_Qfalse);
18371 }
18372}
18373VALUE rb_false(VALUE obj);
18374static VALUE
18375vm_opt_nil_p(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv)
18376{
18377 if (recv == ((VALUE)RUBY_Qnil) &&
18378 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_NIL_P)]&((1 << 9))) == 0), 1)))) {
18379 return ((VALUE)RUBY_Qtrue);
18380 }
18381 else if (vm_method_cfunc_is(iseq, cd, recv, rb_false)) {
18382 return ((VALUE)RUBY_Qfalse);
18383 }
18384 else {
18385 return ((VALUE)RUBY_Qundef);
18386 }
18387}
18388static VALUE
18389fix_succ(VALUE x)
18390{
18391 switch (x) {
18392 case ~0UL:
18393 return __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0));
18394 case ((~0UL)>>(int)(1)):
18395 return rb_uint2big(1UL << (8 * 8 - 2));
18396 default:
18397 return x + 2;
18398 }
18399}
18400static VALUE
18401vm_opt_succ(VALUE recv)
18402{
18403 if (RB_FIXNUM_P(recv) &&
18404 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_SUCC)]&((1 << 0))) == 0), 1)))) {
18405 return fix_succ(recv);
18406 }
18407 else if (RB_SPECIAL_CONST_P(recv)) {
18408 return ((VALUE)RUBY_Qundef);
18409 }
18410 else if (RBASIC_CLASS(recv) == rb_cString &&
18411 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_SUCC)]&((1 << 2))) == 0), 1)))) {
18412 return rb_str_succ(recv);
18413 }
18414 else {
18415 return ((VALUE)RUBY_Qundef);
18416 }
18417}
18418ALWAYS_INLINE(static inline VALUE
18419vm_opt_not(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv));
18420static inline VALUE
18421vm_opt_not(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv) {
18422 if (vm_method_cfunc_is(iseq, cd, recv, rb_obj_not)) {
18423 return RB_TEST(recv) ? ((VALUE)RUBY_Qfalse) : ((VALUE)RUBY_Qtrue);
18424 }
18425 else {
18426 return ((VALUE)RUBY_Qundef);
18427 }
18428}
18429static VALUE
18430vm_opt_regexpmatch2(VALUE recv, VALUE obj)
18431{
18432 if (RB_SPECIAL_CONST_P(recv)) {
18433 return ((VALUE)RUBY_Qundef);
18434 }
18435 else if (RBASIC_CLASS(recv) == rb_cString &&
18436 rb_class_of(obj) == rb_cRegexp &&
18437 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MATCH)]&((1 << 2))) == 0), 1)))) {
18438 return rb_reg_match(obj, recv);
18439 }
18440 else if (RBASIC_CLASS(recv) == rb_cRegexp &&
18441 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MATCH)]&((1 << 8))) == 0), 1)))) {
18442 return rb_reg_match(recv, obj);
18443 }
18444 else {
18445 return ((VALUE)RUBY_Qundef);
18446 }
18447}
18448rb_event_flag_t rb_iseq_event_flags(const rb_iseq_t *iseq, size_t pos);
18449__attribute__((__noinline__)) static void vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp);
18450static inline void
18451vm_trace_hook(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc,
18452 rb_event_flag_t pc_events, rb_event_flag_t target_event,
18453 rb_hook_list_t *global_hooks, rb_hook_list_t *local_hooks, VALUE val)
18454{
18455 rb_event_flag_t event = pc_events & target_event;
18456 VALUE self = (((((reg_cfp)))->self));
18457 ((void)0);
18458 if (event & global_hooks->events) {
18459 reg_cfp->pc++;
18460 vm_dtrace(event, ec);
18461 rb_exec_event_hook_orig(ec, global_hooks, event, self, 0, 0, 0 , val, 0);
18462 reg_cfp->pc--;
18463 }
18464 if (local_hooks != ((void *)0)) {
18465 if (event & local_hooks->events) {
18466 reg_cfp->pc++;
18467 rb_exec_event_hook_orig(ec, local_hooks, event, self, 0, 0, 0 , val, 0);
18468 reg_cfp->pc--;
18469 }
18470 }
18471}static inline
18472_Bool
18473rb_vm_opt_cfunc_p(CALL_CACHE cc, int insn)
18474{
18475 switch (insn) {
18476 case YARVINSN_opt_eq:
18477 return check_cfunc(vm_cc_cme(cc), rb_obj_equal);
18478 case YARVINSN_opt_nil_p:
18479 return check_cfunc(vm_cc_cme(cc), rb_false);
18480 case YARVINSN_opt_not:
18481 return check_cfunc(vm_cc_cme(cc), rb_obj_not);
18482 default:
18483 return 0;
18484 }
18485}
18486static void
18487vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
18488{
18489 const VALUE *pc = reg_cfp->pc;
18490 rb_event_flag_t enabled_flags = ruby_vm_event_flags & (0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010| 0x0100| 0x0200| 0x010000| 0x020000);
18491 if (enabled_flags == 0 && ruby_vm_event_local_num == 0) {
18492 return;
18493 }
18494 else {
18495 const rb_iseq_t *iseq = reg_cfp->iseq;
18496 size_t pos = pc - iseq->body->iseq_encoded;
18497 rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pos);
18498 rb_hook_list_t *local_hooks = iseq->aux.exec.local_hooks;
18499 rb_event_flag_t local_hook_events = local_hooks != ((void *)0) ? local_hooks->events : 0;
18500 enabled_flags |= local_hook_events;
18501 ((void)0);
18502 if ((pc_events & enabled_flags) == 0) {
18503 return;
18504 }
18505 else if (ec->trace_arg != ((void *)0)) {
18506 return;
18507 }
18508 else {
18509 rb_hook_list_t *global_hooks = rb_ec_ractor_hooks(ec);
18510 if (0) {
18511 fprintf(stderr, "vm_trace>>%4d (%4x) - %s:%d %s\n",
18512 (int)pos,
18513 (int)pc_events,
18514 RSTRING_PTR(rb_iseq_path(iseq)),
18515 (int)rb_iseq_line_no(iseq, pos),
18516 RSTRING_PTR(rb_iseq_label(iseq)));
18517 }
18518 ((void)0);
18519 ((void)0);
18520 ((void)0);
18521 do { if ((pc_events & (0x0002 | 0x0008 | 0x0100)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0002 | 0x0008 | 0x0100), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
18522 do { if ((pc_events & (0x0001)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0001), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
18523 do { if ((pc_events & (0x010000)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x010000), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
18524 do { if ((pc_events & (0x020000)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x020000), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
18525 do { if ((pc_events & (0x0004 | 0x0010 | 0x0200)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0004 | 0x0010 | 0x0200), global_hooks, local_hooks, ((*(((((reg_cfp)->sp)))-(0)-1)))); } } while (0);
18526 }
18527 }
18528}static inline
18529void Init_vm_stack_canary(void) { }
18530static VALUE
18531builtin_invoker0(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18532{
18533 typedef VALUE (*rb_invoke_funcptr0_t)(rb_execution_context_t *ec, VALUE self);
18534 return (*(rb_invoke_funcptr0_t)funcptr)(ec, self);
18535}
18536static VALUE
18537builtin_invoker1(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18538{
18539 typedef VALUE (*rb_invoke_funcptr1_t)(rb_execution_context_t *ec, VALUE self, VALUE v1);
18540 return (*(rb_invoke_funcptr1_t)funcptr)(ec, self, argv[0]);
18541}
18542static VALUE
18543builtin_invoker2(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18544{
18545 typedef VALUE (*rb_invoke_funcptr2_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2);
18546 return (*(rb_invoke_funcptr2_t)funcptr)(ec, self, argv[0], argv[1]);
18547}
18548static VALUE
18549builtin_invoker3(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18550{
18551 typedef VALUE (*rb_invoke_funcptr3_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3);
18552 return (*(rb_invoke_funcptr3_t)funcptr)(ec, self, argv[0], argv[1], argv[2]);
18553}
18554static VALUE
18555builtin_invoker4(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18556{
18557 typedef VALUE (*rb_invoke_funcptr4_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4);
18558 return (*(rb_invoke_funcptr4_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3]);
18559}
18560static VALUE
18561builtin_invoker5(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18562{
18563 typedef VALUE (*rb_invoke_funcptr5_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5);
18564 return (*(rb_invoke_funcptr5_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4]);
18565}
18566static VALUE
18567builtin_invoker6(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18568{
18569 typedef VALUE (*rb_invoke_funcptr6_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6);
18570 return (*(rb_invoke_funcptr6_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
18571}
18572static VALUE
18573builtin_invoker7(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18574{
18575 typedef VALUE (*rb_invoke_funcptr7_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7);
18576 return (*(rb_invoke_funcptr7_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
18577}
18578static VALUE
18579builtin_invoker8(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18580{
18581 typedef VALUE (*rb_invoke_funcptr8_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8);
18582 return (*(rb_invoke_funcptr8_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
18583}
18584static VALUE
18585builtin_invoker9(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18586{
18587 typedef VALUE (*rb_invoke_funcptr9_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9);
18588 return (*(rb_invoke_funcptr9_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]);
18589}
18590static VALUE
18591builtin_invoker10(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18592{
18593 typedef VALUE (*rb_invoke_funcptr10_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10);
18594 return (*(rb_invoke_funcptr10_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]);
18595}
18596static VALUE
18597builtin_invoker11(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18598{
18599 typedef VALUE (*rb_invoke_funcptr11_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11);
18600 return (*(rb_invoke_funcptr11_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]);
18601}
18602static VALUE
18603builtin_invoker12(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18604{
18605 typedef VALUE (*rb_invoke_funcptr12_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12);
18606 return (*(rb_invoke_funcptr12_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]);
18607}
18608static VALUE
18609builtin_invoker13(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18610{
18611 typedef VALUE (*rb_invoke_funcptr13_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13);
18612 return (*(rb_invoke_funcptr13_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]);
18613}
18614static VALUE
18615builtin_invoker14(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18616{
18617 typedef VALUE (*rb_invoke_funcptr14_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13, VALUE v14);
18618 return (*(rb_invoke_funcptr14_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]);
18619}
18620static VALUE
18621builtin_invoker15(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
18622{
18623 typedef VALUE (*rb_invoke_funcptr15_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13, VALUE v14, VALUE v15);
18624 return (*(rb_invoke_funcptr15_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]);
18625}
18626typedef VALUE (*builtin_invoker)(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr);
18627static builtin_invoker
18628lookup_builtin_invoker(int argc)
18629{
18630 static const builtin_invoker invokers[] = {
18631 builtin_invoker0,
18632 builtin_invoker1,
18633 builtin_invoker2,
18634 builtin_invoker3,
18635 builtin_invoker4,
18636 builtin_invoker5,
18637 builtin_invoker6,
18638 builtin_invoker7,
18639 builtin_invoker8,
18640 builtin_invoker9,
18641 builtin_invoker10,
18642 builtin_invoker11,
18643 builtin_invoker12,
18644 builtin_invoker13,
18645 builtin_invoker14,
18646 builtin_invoker15,
18647 };
18648 return invokers[argc];
18649}
18650static inline VALUE
18651invoke_bf(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const struct rb_builtin_function* bf, const VALUE *argv)
18652{
18653 const _Bool canary_p = reg_cfp->iseq->body->builtin_inline_p;
18654 if (canary_p) {} else {};
18655 VALUE ret = (*lookup_builtin_invoker(bf->argc))(ec, reg_cfp->self, argv, (rb_insn_func_t)bf->func_ptr);
18656 if (canary_p) {(void)(YARVINSN_invokebuiltin);};
18657 return ret;
18658}
18659static VALUE
18660vm_invoke_builtin(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function* bf, const VALUE *argv)
18661{
18662 return invoke_bf(ec, cfp, bf, argv);
18663}
18664static VALUE
18665vm_invoke_builtin_delegate(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function *bf, unsigned int start_index)
18666{
18667 if (0) {
18668 fprintf(stderr, "vm_invoke_builtin_delegate: passing -> ");
18669 for (int i=0; i<bf->argc; i++) {
18670 fprintf(stderr, ":%s ", rb_id2name(cfp->iseq->body->local_table[i+start_index]));
18671 }
18672 fprintf(stderr, "\n");
18673 fprintf(stderr, "%s %s(%d):%p\n", __func__, bf->name, bf->argc, bf->func_ptr);
18674 }
18675 if (bf->argc == 0) {
18676 return invoke_bf(ec, cfp, bf, ((void *)0));
18677 }
18678 else {
18679 const VALUE *argv = cfp->ep - cfp->iseq->body->local_table_size - ( 3) + 1 + start_index;
18680 return invoke_bf(ec, cfp, bf, argv);
18681 }
18682}static inline
18683VALUE
18684rb_vm_lvar_exposed(rb_execution_context_t *ec, int index)
18685{
18686 const rb_control_frame_t *cfp = ec->cfp;
18687 return cfp->ep[index];
18688}
18689struct local_var_list {
18690 VALUE tbl;
18691};
18692static inline VALUE method_missing(rb_execution_context_t *ec, VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status, int kw_splat);
18693static inline VALUE vm_yield_with_cref(rb_execution_context_t *ec, int argc, const VALUE *argv, int kw_splat, const rb_cref_t *cref, int is_lambda);
18694static inline VALUE vm_yield(rb_execution_context_t *ec, int argc, const VALUE *argv, int kw_splat);
18695static inline VALUE vm_yield_with_block(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE block_handler, int kw_splat);
18696static inline VALUE vm_yield_force_blockarg(rb_execution_context_t *ec, VALUE args);
18697VALUE rb_vm_exec(rb_execution_context_t *ec, _Bool mjit_enable_p);
18698static void vm_set_eval_stack(rb_execution_context_t * th, const rb_iseq_t *iseq, const rb_cref_t *cref, const struct rb_block *base_block);
18699static int vm_collect_local_variables_in_heap(const VALUE *dfp, const struct local_var_list *vars);
18700static VALUE rb_eUncaughtThrow;
18701static ID id_result, id_tag, id_value;
18702typedef enum call_type {
18703 CALL_PUBLIC,
18704 CALL_FCALL,
18705 CALL_VCALL,
18706 CALL_PUBLIC_KW,
18707 CALL_FCALL_KW,
18708 CALL_TYPE_MAX
18709} call_type;
18710static VALUE send_internal(int argc, const VALUE *argv, VALUE recv, call_type scope);
18711static VALUE vm_call0_body(rb_execution_context_t* ec, struct rb_calling_info *calling, const VALUE *argv);
18712static inline void
18713stack_check(rb_execution_context_t *ec)
18714{
18715 if (!(((ec)->raised_flag & (RAISED_STACKOVERFLOW)) != 0) &&
18716 rb_ec_stack_check(ec)) {
18717 ((ec)->raised_flag |= (RAISED_STACKOVERFLOW));
18718 rb_ec_stack_overflow(ec, 0);
18719 }
18720}
18721static void
18722raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj,
18723 enum method_missing_reason last_call_status)
18724{
18725 VALUE exc = rb_eNoMethodError;
18726 VALUE format = 0;
18727 if ((__builtin_expect(!!(argc == 0), 0))) {
18728 rb_raise(rb_eArgError, "no method name given");
18729 }
18730 else if ((__builtin_expect(!!(!RB_SYMBOL_P(argv[0])), 0))) {
18731 const VALUE e = rb_eArgError;
18732 rb_raise(e, "method name must be a Symbol but %""l""i" "\v"" is given",
18733 rb_obj_class(argv[0]));
18734 }
18735 stack_check(ec);
18736 if (last_call_status & MISSING_PRIVATE) {
18737 format = rb_fstring_new(("private method `%s' called for %s%s%s"), (sizeof("private method `%s' called for %s%s%s" "") - 1));
18738 }
18739 else if (last_call_status & MISSING_PROTECTED) {
18740 format = rb_fstring_new(("protected method `%s' called for %s%s%s"), (sizeof("protected method `%s' called for %s%s%s" "") - 1));
18741 }
18742 else if (last_call_status & MISSING_VCALL) {
18743 format = rb_fstring_new(("undefined local variable or method `%s' for %s%s%s"), (sizeof("undefined local variable or method `%s' for %s%s%s" "") - 1));
18744 exc = rb_eNameError;
18745 }
18746 else if (last_call_status & MISSING_SUPER) {
18747 format = rb_fstring_new(("super: no superclass method `%s' for %s%s%s"), (sizeof("super: no superclass method `%s' for %s%s%s" "") - 1));
18748 }
18749 {
18750 exc = rb_make_no_method_exception(exc, format, obj, argc, argv,
18751 last_call_status & (MISSING_FCALL|MISSING_VCALL));
18752 if (!(last_call_status & MISSING_MISSING)) {
18753 rb_vm_pop_cfunc_frame();
18754 }
18755 rb_exc_raise(exc);
18756 }
18757}
18758static void
18759vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv,
18760 VALUE obj, int call_status)
18761{
18762 vm_passed_block_handler_set(ec, 0);
18763 raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING);
18764}
18765static inline VALUE
18766method_missing(rb_execution_context_t *ec, VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status, int kw_splat)
18767{
18768 VALUE *nargv, result, work, klass;
18769 VALUE block_handler = vm_passed_block_handler(ec);
18771 ec->method_missing_reason = call_status;
18772 if (id == idMethodMissing) {
18773 goto missing;
18774 }
18775 nargv = ((VALUE *) (((size_t)(argc + 1) < 1024 / sizeof(VALUE)) ? ((work) = 0, __builtin_alloca ((argc + 1) * sizeof(VALUE))) : rb_alloc_tmp_buffer2(&(work), (argc + 1), sizeof(VALUE))));
18776 nargv[0] = rb_id2sym(id);
18777 if (!argv) {
18778 static const VALUE buf = ((VALUE)RUBY_Qfalse);
18779 ((void)0);
18780 argv = &buf;
18781 }
18782 ruby_nonempty_memcpy((nargv + 1), (argv), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc)));
18783 ++argc;
18784 argv = nargv;
18785 klass = rb_class_of(obj);
18786 if (!klass) goto missing;
18787 me = rb_callable_method_entry(klass, idMethodMissing);
18788 if (!me || (int) (((me)->flags & (((VALUE)RUBY_FL_USER6) )) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+2))) goto missing;
18789 vm_passed_block_handler_set(ec, block_handler);
18790 result = rb_vm_call_kw(ec, obj, idMethodMissing, argc, argv, me, kw_splat);
18791 if (work) rb_free_tmp_buffer(&(work));
18792 return result;
18793 missing:
18794 raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING);
18795 __builtin_unreachable();
18796}
18797static rb_control_frame_t *
18798vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
18799{
18800 if (VM_FRAME_RUBYFRAME_P(cfp)) {
18801 return (rb_control_frame_t *)cfp;
18802 }
18803 cfp = ((cfp)+1);
18804 while (!RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) {
18805 if (VM_FRAME_RUBYFRAME_P(cfp)) {
18806 return (rb_control_frame_t *)cfp;
18807 }
18808 if (VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_PASSED) == 0) {
18809 break;
18810 }
18811 cfp = ((cfp)+1);
18812 }
18813 return 0;
18814}
18815static void
18816rb_vm_pop_cfunc_frame(void)
18817{
18818 rb_execution_context_t *ec = rb_current_execution_context(1);
18819 rb_control_frame_t *cfp = ec->cfp;
18820 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(cfp);
18821 do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, cfp->self, me->def->original_id, me->called_id, me->owner, ((VALUE)RUBY_Qnil), 0); } } while (0);
18822 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
18823 vm_pop_frame(ec, cfp, cfp->ep);
18824}
18825static VALUE
18826vm_call_iseq_setup_normal_0start_0params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18827{
18828 ((void)0);
18829 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 0);
18830}
18831static VALUE
18832vm_call_iseq_setup_normal_0start_0params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18833{
18834 ((void)0);
18835 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 1);
18836}
18837static VALUE
18838vm_call_iseq_setup_normal_0start_0params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18839{
18840 ((void)0);
18841 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 2);
18842}
18843static VALUE
18844vm_call_iseq_setup_normal_0start_0params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18845{
18846 ((void)0);
18847 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 3);
18848}
18849static VALUE
18850vm_call_iseq_setup_normal_0start_0params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18851{
18852 ((void)0);
18853 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 4);
18854}
18855static VALUE
18856vm_call_iseq_setup_normal_0start_0params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18857{
18858 ((void)0);
18859 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 5);
18860}
18861static VALUE
18862vm_call_iseq_setup_normal_0start_1params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18863{
18864 ((void)0);
18865 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 0);
18866}
18867static VALUE
18868vm_call_iseq_setup_normal_0start_1params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18869{
18870 ((void)0);
18871 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 1);
18872}
18873static VALUE
18874vm_call_iseq_setup_normal_0start_1params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18875{
18876 ((void)0);
18877 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 2);
18878}
18879static VALUE
18880vm_call_iseq_setup_normal_0start_1params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18881{
18882 ((void)0);
18883 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 3);
18884}
18885static VALUE
18886vm_call_iseq_setup_normal_0start_1params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18887{
18888 ((void)0);
18889 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 4);
18890}
18891static VALUE
18892vm_call_iseq_setup_normal_0start_1params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18893{
18894 ((void)0);
18895 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 5);
18896}
18897static VALUE
18898vm_call_iseq_setup_normal_0start_2params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18899{
18900 ((void)0);
18901 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 0);
18902}
18903static VALUE
18904vm_call_iseq_setup_normal_0start_2params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18905{
18906 ((void)0);
18907 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 1);
18908}
18909static VALUE
18910vm_call_iseq_setup_normal_0start_2params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18911{
18912 ((void)0);
18913 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 2);
18914}
18915static VALUE
18916vm_call_iseq_setup_normal_0start_2params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18917{
18918 ((void)0);
18919 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 3);
18920}
18921static VALUE
18922vm_call_iseq_setup_normal_0start_2params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18923{
18924 ((void)0);
18925 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 4);
18926}
18927static VALUE
18928vm_call_iseq_setup_normal_0start_2params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18929{
18930 ((void)0);
18931 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 5);
18932}
18933static VALUE
18934vm_call_iseq_setup_normal_0start_3params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18935{
18936 ((void)0);
18937 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 0);
18938}
18939static VALUE
18940vm_call_iseq_setup_normal_0start_3params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18941{
18942 ((void)0);
18943 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 1);
18944}
18945static VALUE
18946vm_call_iseq_setup_normal_0start_3params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18947{
18948 ((void)0);
18949 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 2);
18950}
18951static VALUE
18952vm_call_iseq_setup_normal_0start_3params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18953{
18954 ((void)0);
18955 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 3);
18956}
18957static VALUE
18958vm_call_iseq_setup_normal_0start_3params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18959{
18960 ((void)0);
18961 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 4);
18962}
18963static VALUE
18964vm_call_iseq_setup_normal_0start_3params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18965{
18966 ((void)0);
18967 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 5);
18968}
18969static const vm_call_handler vm_call_iseq_handlers[][6] = {
18970 {
18971 vm_call_iseq_setup_normal_0start_0params_0locals,
18972 vm_call_iseq_setup_normal_0start_0params_1locals,
18973 vm_call_iseq_setup_normal_0start_0params_2locals,
18974 vm_call_iseq_setup_normal_0start_0params_3locals,
18975 vm_call_iseq_setup_normal_0start_0params_4locals,
18976 vm_call_iseq_setup_normal_0start_0params_5locals,
18977 },
18978 {
18979 vm_call_iseq_setup_normal_0start_1params_0locals,
18980 vm_call_iseq_setup_normal_0start_1params_1locals,
18981 vm_call_iseq_setup_normal_0start_1params_2locals,
18982 vm_call_iseq_setup_normal_0start_1params_3locals,
18983 vm_call_iseq_setup_normal_0start_1params_4locals,
18984 vm_call_iseq_setup_normal_0start_1params_5locals,
18985 },
18986 {
18987 vm_call_iseq_setup_normal_0start_2params_0locals,
18988 vm_call_iseq_setup_normal_0start_2params_1locals,
18989 vm_call_iseq_setup_normal_0start_2params_2locals,
18990 vm_call_iseq_setup_normal_0start_2params_3locals,
18991 vm_call_iseq_setup_normal_0start_2params_4locals,
18992 vm_call_iseq_setup_normal_0start_2params_5locals,
18993 },
18994 {
18995 vm_call_iseq_setup_normal_0start_3params_0locals,
18996 vm_call_iseq_setup_normal_0start_3params_1locals,
18997 vm_call_iseq_setup_normal_0start_3params_2locals,
18998 vm_call_iseq_setup_normal_0start_3params_3locals,
18999 vm_call_iseq_setup_normal_0start_3params_4locals,
19000 vm_call_iseq_setup_normal_0start_3params_5locals,
19001 },
19002};
19003static inline vm_call_handler
19004vm_call_iseq_setup_func(const struct rb_callinfo *ci, const int param_size, const int local_size)
19005{
19006 if ((__builtin_expect(!!(vm_ci_flag(ci) & (0x01 << VM_CALL_TAILCALL_bit)), 0))) {
19007 return &vm_call_iseq_setup_tailcall_0start;
19008 }
19009 else if (0) {
19010 return &vm_call_iseq_setup_normal_0start;
19011 }
19012 else if (param_size <= 3 && local_size <= 5) {
19013 ((void)0);
19014 return vm_call_iseq_handlers[param_size][local_size];
19015 }
19016 else {
19017 return &vm_call_iseq_setup_normal_0start;
19018 }
19019}
19020#define MJIT_HEADER 1
19021#define _FORTIFY_SOURCE 2
19022#define RUBY_EXPORT 1
19023#define _STDC_PREDEF_H 1
19024#define __STDC_IEC_559__ 1
19025#define __STDC_IEC_559_COMPLEX__ 1
19026#define __STDC_ISO_10646__ 201706L
19027#define vm_exec rb_vm_exec
19028#define RUBY_EVAL_INTERN_H
19029#define RUBY_RUBY_H 1
19030#define RBIMPL_CONFIG_H
19031#define INCLUDE_RUBY_CONFIG_H 1
19032#define HAVE_STDIO_H 1
19033#define HAVE_STDLIB_H 1
19034#define HAVE_STRING_H 1
19035#define HAVE_INTTYPES_H 1
19036#define HAVE_STDINT_H 1
19037#define HAVE_STRINGS_H 1
19038#define HAVE_SYS_STAT_H 1
19039#define HAVE_SYS_TYPES_H 1
19040#define HAVE_UNISTD_H 1
19041#define HAVE_WCHAR_H 1
19042#define STDC_HEADERS 1
19043#define _ALL_SOURCE 1
19044#define _DARWIN_C_SOURCE 1
19045#define _GNU_SOURCE 1
19046#define _HPUX_ALT_XOPEN_SOCKET_API 1
19047#define _NETBSD_SOURCE 1
19048#define _OPENBSD_SOURCE 1
19049#define _POSIX_PTHREAD_SEMANTICS 1
19050#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
19051#define __STDC_WANT_IEC_60559_BFP_EXT__ 1
19052#define __STDC_WANT_IEC_60559_DFP_EXT__ 1
19053#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
19054#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
19055#define __STDC_WANT_LIB_EXT2__ 1
19056#define __STDC_WANT_MATH_SPEC_FUNCS__ 1
19057#define _TANDEM_SOURCE 1
19058#define __EXTENSIONS__ 1
19059#define RUBY_SYMBOL_EXPORT_BEGIN _Pragma("GCC visibility push(default)")
19060#define RUBY_SYMBOL_EXPORT_END _Pragma("GCC visibility pop")
19061#define HAVE_STMT_AND_DECL_IN_EXPR 1
19062#define HAVE_LIBCRYPT 1
19063#define HAVE_LIBDL 1
19064#define HAVE_DIRENT_H 1
19065#define HAVE__BOOL 1
19066#define HAVE_STDBOOL_H 1
19067#define HAVE_SYS_WAIT_H 1
19068#define HAVE_A_OUT_H 1
19069#define HAVE_GRP_H 1
19070#define HAVE_FCNTL_H 1
19071#define HAVE_FLOAT_H 1
19072#define HAVE_LANGINFO_H 1
19073#define HAVE_LIMITS_H 1
19074#define HAVE_LOCALE_H 1
19075#define HAVE_MALLOC_H 1
19076#define HAVE_PWD_H 1
19077#define HAVE_SANITIZER_ASAN_INTERFACE_H 1
19078#define HAVE_SANITIZER_MSAN_INTERFACE_H 1
19079#define HAVE_STDALIGN_H 1
19080#define HAVE_SYS_EVENTFD_H 1
19081#define HAVE_SYS_FCNTL_H 1
19082#define HAVE_SYS_FILE_H 1
19083#define HAVE_SYS_IOCTL_H 1
19084#define HAVE_SYS_PARAM_H 1
19085#define HAVE_SYS_PRCTL_H 1
19086#define HAVE_SYS_RESOURCE_H 1
19087#define HAVE_SYS_SELECT_H 1
19088#define HAVE_SYS_SENDFILE_H 1
19089#define HAVE_SYS_SOCKET_H 1
19090#define HAVE_SYS_SYSCALL_H 1
19091#define HAVE_SYS_SYSMACROS_H 1
19092#define HAVE_SYS_TIME_H 1
19093#define HAVE_SYS_TIMES_H 1
19094#define HAVE_SYS_UIO_H 1
19095#define HAVE_SYSCALL_H 1
19096#define HAVE_TIME_H 1
19097#define HAVE_UCONTEXT_H 1
19098#define HAVE_UTIME_H 1
19099#define HAVE_X86INTRIN_H 1
19100#define HAVE_GMP_H 1
19101#define HAVE_LIBGMP 1
19102#define HAVE_TYPEOF 1
19103#define restrict __restrict__
19104#define HAVE_LONG_LONG 1
19105#define HAVE_OFF_T 1
19106#define SIZEOF_INT 4
19107#define SIZEOF_SHORT 2
19108#define SIZEOF_LONG 8
19109#define SIZEOF_LONG_LONG 8
19110#define SIZEOF___INT64 0
19111#define SIZEOF___INT128 16
19112#define SIZEOF_OFF_T 8
19113#define SIZEOF_VOIDP 8
19114#define SIZEOF_FLOAT 4
19115#define SIZEOF_DOUBLE 8
19116#define SIZEOF_TIME_T 8
19117#define SIZEOF_CLOCK_T 8
19118#define PACKED_STRUCT(x) x __attribute__((packed))
19119#define USE_UNALIGNED_MEMBER_ACCESS 1
19120#define PRI_LL_PREFIX "ll"
19121#define HAVE_PID_T 1
19122#define rb_pid_t pid_t
19123#define SIGNEDNESS_OF_PID_T -1
19124#define PIDT2NUM(v) INT2NUM(v)
19125#define NUM2PIDT(v) NUM2INT(v)
19126#define PRI_PIDT_PREFIX PRI_INT_PREFIX
19127#define HAVE_UID_T 1
19128#define rb_uid_t uid_t
19129#define SIGNEDNESS_OF_UID_T +1
19130#define UIDT2NUM(v) UINT2NUM(v)
19131#define NUM2UIDT(v) NUM2UINT(v)
19132#define PRI_UIDT_PREFIX PRI_INT_PREFIX
19133#define HAVE_GID_T 1
19134#define rb_gid_t gid_t
19135#define SIGNEDNESS_OF_GID_T +1
19136#define GIDT2NUM(v) UINT2NUM(v)
19137#define NUM2GIDT(v) NUM2UINT(v)
19138#define PRI_GIDT_PREFIX PRI_INT_PREFIX
19139#define HAVE_TIME_T 1
19140#define rb_time_t time_t
19141#define SIGNEDNESS_OF_TIME_T -1
19142#define TIMET2NUM(v) LONG2NUM(v)
19143#define NUM2TIMET(v) NUM2LONG(v)
19144#define PRI_TIMET_PREFIX PRI_LONG_PREFIX
19145#define HAVE_DEV_T 1
19146#define rb_dev_t dev_t
19147#define SIGNEDNESS_OF_DEV_T +1
19148#define DEVT2NUM(v) ULONG2NUM(v)
19149#define NUM2DEVT(v) NUM2ULONG(v)
19150#define PRI_DEVT_PREFIX PRI_LONG_PREFIX
19151#define HAVE_MODE_T 1
19152#define rb_mode_t mode_t
19153#define SIGNEDNESS_OF_MODE_T +1
19154#define MODET2NUM(v) UINT2NUM(v)
19155#define NUM2MODET(v) NUM2UINT(v)
19156#define PRI_MODET_PREFIX PRI_INT_PREFIX
19157#define HAVE_RLIM_T 1
19158#define rb_rlim_t rlim_t
19159#define SIGNEDNESS_OF_RLIM_T +1
19160#define RLIM2NUM(v) ULONG2NUM(v)
19161#define NUM2RLIM(v) NUM2ULONG(v)
19162#define PRI_RLIM_PREFIX PRI_LONG_PREFIX
19163#define HAVE_OFF_T 1
19164#define rb_off_t off_t
19165#define SIGNEDNESS_OF_OFF_T -1
19166#define OFFT2NUM(v) LONG2NUM(v)
19167#define NUM2OFFT(v) NUM2LONG(v)
19168#define PRI_OFFT_PREFIX PRI_LONG_PREFIX
19169#define HAVE_CLOCKID_T 1
19170#define rb_clockid_t clockid_t
19171#define SIGNEDNESS_OF_CLOCKID_T -1
19172#define CLOCKID2NUM(v) INT2NUM(v)
19173#define NUM2CLOCKID(v) NUM2INT(v)
19174#define PRI_CLOCKID_PREFIX PRI_INT_PREFIX
19175#define HAVE_VA_ARGS_MACRO 1
19176#define HAVE__ALIGNOF 1
19177#define CONSTFUNC(x) __attribute__ ((__const__)) x
19178#define PUREFUNC(x) __attribute__ ((__pure__)) x
19179#define NORETURN(x) __attribute__ ((__noreturn__)) x
19180#define DEPRECATED(x) __attribute__ ((__deprecated__)) x
19181#define DEPRECATED_BY(n,x) __attribute__ ((__deprecated__("by "#n))) x
19182#define NOINLINE(x) __attribute__ ((__noinline__)) x
19183#define NO_SANITIZE(san,x) __attribute__ ((__no_sanitize__(san))) x
19184#define NO_SANITIZE_ADDRESS(x) __attribute__ ((__no_sanitize_address__)) x
19185#define NO_ADDRESS_SAFETY_ANALYSIS(x) __attribute__ ((__no_address_safety_analysis__)) x
19186#define WARN_UNUSED_RESULT(x) __attribute__ ((__warn_unused_result__)) x
19187#define MAYBE_UNUSED(x) __attribute__ ((__unused__)) x
19188#define ERRORFUNC(mesg,x) __attribute__ ((__error__ mesg)) x
19189#define WARNINGFUNC(mesg,x) __attribute__ ((__warning__ mesg)) x
19190#define WEAK(x) __attribute__ ((__weak__)) x
19191#define HAVE_FUNC_WEAK 1
19192#define RUBY_CXX_DEPRECATED(msg) __attribute__((__deprecated__(msg)))
19193#define HAVE_NULLPTR 1
19194#define FUNC_UNOPTIMIZED(x) __attribute__ ((__optimize__("O0"))) x
19195#define FUNC_MINIMIZED(x) __attribute__ ((__optimize__("-Os","-fomit-frame-pointer"))) x
19196#define HAVE_ATTRIBUTE_FUNCTION_ALIAS 1
19197#define RUBY_ALIAS_FUNCTION_TYPE(type,prot,name,args) type prot __attribute__((alias(#name)));
19198#define RUBY_ALIAS_FUNCTION_VOID(prot,name,args) RUBY_ALIAS_FUNCTION_TYPE(void, prot, name, args)
19199#define HAVE_GCC_ATOMIC_BUILTINS 1
19200#define HAVE_GCC_SYNC_BUILTINS 1
19201#define UNREACHABLE __builtin_unreachable()
19202#define RUBY_FUNC_EXPORTED __attribute__ ((__visibility__("default"))) extern
19203#define RUBY_FUNC_NONNULL(n,x) __attribute__ ((__nonnull__(n))) x
19204#define RUBY_FUNCTION_NAME_STRING __func__
19205#define ENUM_OVER_INT 1
19206#define HAVE_DECL_SYS_NERR 0
19207#define HAVE_DECL_GETENV 1
19208#define SIZEOF_SIZE_T 8
19209#define SIZEOF_PTRDIFF_T 8
19210#define PRI_SIZE_PREFIX "z"
19211#define PRI_PTRDIFF_PREFIX "t"
19212#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19213#define HAVE_STRUCT_STAT_ST_BLOCKS 1
19214#define HAVE_STRUCT_STAT_ST_RDEV 1
19215#define SIZEOF_STRUCT_STAT_ST_SIZE SIZEOF_OFF_T
19216#define SIZEOF_STRUCT_STAT_ST_BLOCKS SIZEOF_OFF_T
19217#define SIZEOF_STRUCT_STAT_ST_INO SIZEOF_LONG
19218#define HAVE_STRUCT_STAT_ST_ATIM 1
19219#define HAVE_STRUCT_STAT_ST_MTIM 1
19220#define HAVE_STRUCT_STAT_ST_CTIM 1
19221#define HAVE_STRUCT_STATX_STX_BTIME 1
19222#define HAVE_STRUCT_TIMEVAL 1
19223#define SIZEOF_STRUCT_TIMEVAL_TV_SEC SIZEOF_TIME_T
19224#define HAVE_STRUCT_TIMESPEC 1
19225#define HAVE_STRUCT_TIMEZONE 1
19226#define HAVE_RB_FD_INIT 1
19227#define HAVE_INT8_T 1
19228#define SIZEOF_INT8_T 1
19229#define HAVE_UINT8_T 1
19230#define SIZEOF_UINT8_T 1
19231#define HAVE_INT16_T 1
19232#define SIZEOF_INT16_T 2
19233#define HAVE_UINT16_T 1
19234#define SIZEOF_UINT16_T 2
19235#define HAVE_INT32_T 1
19236#define SIZEOF_INT32_T 4
19237#define HAVE_UINT32_T 1
19238#define SIZEOF_UINT32_T 4
19239#define HAVE_INT64_T 1
19240#define SIZEOF_INT64_T 8
19241#define HAVE_UINT64_T 1
19242#define SIZEOF_UINT64_T 8
19243#define HAVE_INT128_T 1
19244#define int128_t __int128
19245#define SIZEOF_INT128_T SIZEOF___INT128
19246#define HAVE_UINT128_T 1
19247#define uint128_t unsigned __int128
19248#define SIZEOF_UINT128_T SIZEOF___INT128
19249#define HAVE_INTPTR_T 1
19250#define SIZEOF_INTPTR_T 8
19251#define HAVE_UINTPTR_T 1
19252#define SIZEOF_UINTPTR_T 8
19253#define HAVE_SSIZE_T 1
19254#define SIZEOF_SSIZE_T 8
19255#define STACK_END_ADDRESS __libc_stack_end
19256#define GETGROUPS_T gid_t
19257#define HAVE_ALLOCA_H 1
19258#define HAVE_ALLOCA 1
19259#define HAVE_ACOSH 1
19260#define HAVE_CBRT 1
19261#define HAVE_CRYPT 1
19262#define HAVE_DUP2 1
19263#define HAVE_ERF 1
19264#define HAVE_EXPLICIT_BZERO 1
19265#define HAVE_FFS 1
19266#define HAVE_FLOCK 1
19267#define HAVE_HYPOT 1
19268#define HAVE_LGAMMA_R 1
19269#define HAVE_MEMMOVE 1
19270#define HAVE_NAN 1
19271#define HAVE_NEXTAFTER 1
19272#define HAVE_STRCHR 1
19273#define HAVE_STRERROR 1
19274#define HAVE_STRSTR 1
19275#define HAVE_TGAMMA 1
19276#define HAVE_FINITE 1
19277#define HAVE_ISINF 1
19278#define HAVE_ISNAN 1
19279#define SPT_TYPE SPT_REUSEARGV
19280#define HAVE_SIGNBIT 1
19281#define HAVE_FORK 1
19282#define HAVE_VFORK 1
19283#define HAVE_WORKING_VFORK 1
19284#define HAVE_WORKING_FORK 1
19285#define HAVE__LONGJMP 1
19286#define HAVE_ATAN2L 1
19287#define HAVE_ATAN2F 1
19288#define HAVE_CHROOT 1
19289#define HAVE_CLOCK_GETTIME 1
19290#define HAVE_COPY_FILE_RANGE 1
19291#define HAVE_COSH 1
19292#define HAVE_CRYPT_R 1
19293#define HAVE_DIRFD 1
19294#define HAVE_DL_ITERATE_PHDR 1
19295#define HAVE_DLOPEN 1
19296#define HAVE_DLADDR 1
19297#define HAVE_DUP 1
19298#define HAVE_DUP3 1
19299#define HAVE_EACCESS 1
19300#define HAVE_ENDGRENT 1
19301#define HAVE_EVENTFD 1
19302#define HAVE_FCHMOD 1
19303#define HAVE_FCHOWN 1
19304#define HAVE_FCNTL 1
19305#define HAVE_FDATASYNC 1
19306#define HAVE_FDOPENDIR 1
19307#define HAVE_FMOD 1
19308#define HAVE_FSTATAT 1
19309#define HAVE_FSYNC 1
19310#define HAVE_FTRUNCATE 1
19311#define HAVE_FTRUNCATE64 1
19312#define HAVE_GETCWD 1
19313#define HAVE_GETGRNAM 1
19314#define HAVE_GETGRNAM_R 1
19315#define HAVE_GETGROUPS 1
19316#define HAVE_GETLOGIN 1
19317#define HAVE_GETLOGIN_R 1
19318#define HAVE_GETPGID 1
19319#define HAVE_GETPGRP 1
19320#define HAVE_GETPRIORITY 1
19321#define HAVE_GETPWNAM 1
19322#define HAVE_GETPWNAM_R 1
19323#define HAVE_GETPWUID 1
19324#define HAVE_GETPWUID_R 1
19325#define HAVE_GETRANDOM 1
19326#define HAVE_GETRESGID 1
19327#define HAVE_GETRESUID 1
19328#define HAVE_GETRLIMIT 1
19329#define HAVE_GETSID 1
19330#define HAVE_GETTIMEOFDAY 1
19331#define HAVE_GMTIME_R 1
19332#define HAVE_GRANTPT 1
19333#define HAVE_INITGROUPS 1
19334#define HAVE_IOCTL 1
19335#define HAVE_KILLPG 1
19336#define HAVE_LCHMOD 1
19337#define HAVE_LCHOWN 1
19338#define HAVE_LINK 1
19339#define HAVE_LLABS 1
19340#define HAVE_LOCKF 1
19341#define HAVE_LOG2 1
19342#define HAVE_LSTAT 1
19343#define HAVE_LUTIMES 1
19344#define HAVE_MALLOC_USABLE_SIZE 1
19345#define HAVE_MBLEN 1
19346#define HAVE_MEMALIGN 1
19347#define HAVE_WRITEV 1
19348#define HAVE_MEMRCHR 1
19349#define HAVE_MEMMEM 1
19350#define HAVE_MKFIFO 1
19351#define HAVE_MKNOD 1
19352#define HAVE_MKTIME 1
19353#define HAVE_OPENAT 1
19354#define HAVE_PIPE2 1
19355#define HAVE_POLL 1
19356#define HAVE_POSIX_FADVISE 1
19357#define HAVE_POSIX_MEMALIGN 1
19358#define HAVE_PPOLL 1
19359#define HAVE_PREAD 1
19360#define HAVE_PWRITE 1
19361#define HAVE_QSORT_R 1
19362#define HAVE_READLINK 1
19363#define HAVE_REALPATH 1
19364#define HAVE_ROUND 1
19365#define HAVE_SCHED_GETAFFINITY 1
19366#define HAVE_SEEKDIR 1
19367#define HAVE_SENDFILE 1
19368#define HAVE_SETEGID 1
19369#define HAVE_SETENV 1
19370#define HAVE_SETEUID 1
19371#define HAVE_SETGID 1
19372#define HAVE_SETGROUPS 1
19373#define HAVE_SETPGID 1
19374#define HAVE_SETPGRP 1
19375#define HAVE_SETREGID 1
19376#define HAVE_SETRESGID 1
19377#define HAVE_SETRESUID 1
19378#define HAVE_SETREUID 1
19379#define HAVE_SETRLIMIT 1
19380#define HAVE_SETSID 1
19381#define HAVE_SETUID 1
19382#define HAVE_SHUTDOWN 1
19383#define HAVE_SIGACTION 1
19384#define HAVE_SIGALTSTACK 1
19385#define HAVE_SIGPROCMASK 1
19386#define HAVE_SINH 1
19387#define HAVE_SYMLINK 1
19388#define HAVE_SYSCALL 1
19389#define HAVE_SYSCONF 1
19390#define HAVE_TANH 1
19391#define HAVE_TELLDIR 1
19392#define HAVE_TIMEGM 1
19393#define HAVE_TIMES 1
19394#define HAVE_TRUNCATE 1
19395#define HAVE_TRUNCATE64 1
19396#define HAVE_UNSETENV 1
19397#define HAVE_UTIMENSAT 1
19398#define HAVE_UTIMES 1
19399#define HAVE_WAIT4 1
19400#define HAVE_WAITPID 1
19401#define HAVE_STATX 1
19402#define HAVE_CRYPT_H 1
19403#define HAVE_STRUCT_CRYPT_DATA_INITIALIZED 1
19404#define HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN 1
19405#define HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED 1
19406#define HAVE_BUILTIN___BUILTIN_BSWAP16 1
19407#define HAVE_BUILTIN___BUILTIN_BSWAP32 1
19408#define HAVE_BUILTIN___BUILTIN_BSWAP64 1
19409#define HAVE_BUILTIN___BUILTIN_POPCOUNT 1
19410#define HAVE_BUILTIN___BUILTIN_POPCOUNTLL 1
19411#define HAVE_BUILTIN___BUILTIN_CLZ 1
19412#define HAVE_BUILTIN___BUILTIN_CLZL 1
19413#define HAVE_BUILTIN___BUILTIN_CLZLL 1
19414#define HAVE_BUILTIN___BUILTIN_CTZ 1
19415#define HAVE_BUILTIN___BUILTIN_CTZLL 1
19416#define HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW 1
19417#define HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW 1
19418#define HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW 1
19419#define HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW_P 1
19420#define HAVE_BUILTIN___BUILTIN_CONSTANT_P 1
19421#define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR 1
19422#define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P 1
19423#define HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P 1
19424#define HAVE_BUILTIN___BUILTIN_TRAP 1
19425#define HAVE_GNU_QSORT_R 1
19426#define ATAN2_INF_C99 1
19427#define HAVE_CLOCK_GETRES 1
19428#define HAVE_LIBRT 1
19429#define HAVE_LIBRT 1
19430#define HAVE_TIMER_CREATE 1
19431#define HAVE_TIMER_SETTIME 1
19432#define HAVE_STRUCT_TM_TM_ZONE 1
19433#define HAVE_TM_ZONE 1
19434#define HAVE_STRUCT_TM_TM_GMTOFF 1
19435#define HAVE_DAYLIGHT 1
19436#define NEGATIVE_TIME_T 1
19437#define POSIX_SIGNAL 1
19438#define HAVE_SIG_T 1
19439#define RSHIFT(x,y) ((x)>>(int)(y))
19440#define USE_COPY_FILE_RANGE 1
19441#define HAVE__SC_CLK_TCK 1
19442#define STACK_GROW_DIRECTION -1
19443#define COROUTINE_H "coroutine/amd64/Context.h"
19444#define _REENTRANT 1
19445#define _THREAD_SAFE 1
19446#define HAVE_LIBPTHREAD 1
19447#define HAVE_SCHED_YIELD 1
19448#define HAVE_PTHREAD_ATTR_SETINHERITSCHED 1
19449#define HAVE_PTHREAD_ATTR_GETSTACK 1
19450#define HAVE_PTHREAD_ATTR_GETGUARDSIZE 1
19451#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
19452#define HAVE_PTHREAD_SIGMASK 1
19453#define HAVE_PTHREAD_SETNAME_NP 1
19454#define HAVE_PTHREAD_GETATTR_NP 1
19455#define SET_CURRENT_THREAD_NAME(name) pthread_setname_np(pthread_self(), name)
19456#define SET_ANOTHER_THREAD_NAME(thid,name) pthread_setname_np(thid, name)
19457#define DEFINE_MCONTEXT_PTR(mc,uc) mcontext_t *mc = &(uc)->uc_mcontext
19458#define HAVE_GETCONTEXT 1
19459#define HAVE_SETCONTEXT 1
19460#define USE_ELF 1
19461#define HAVE_ELF_H 1
19462#define HAVE_LIBZ 1
19463#define HAVE_BACKTRACE 1
19464#define HAVE_VALGRIND_MEMCHECK_H 1
19465#define DLEXT_MAXLEN 3
19466#define DLEXT ".so"
19467#define HAVE__SETJMP 1
19468#define RUBY_SETJMP(env) __builtin_setjmp((env))
19469#define RUBY_LONGJMP(env,val) __builtin_longjmp((env),val)
19470#define USE_MJIT 1
19471#define HAVE_PTHREAD_H 1
19472#define RUBY_PLATFORM "x86_64-linux"
19473#define RBIMPL_COMPILER_SINCE_H
19474#define RBIMPL_COMPILER_IS_H
19475#define RBIMPL_COMPILER_IS(cc) RBIMPL_COMPILER_IS_ ## cc
19476#define RBIMPL_COMPILER_IS_APPLE_H
19477#define RBIMPL_COMPILER_IS_Apple 0
19478#define RBIMPL_COMPILER_IS_CLANG_H
19479#define RBIMPL_COMPILER_IS_Clang 0
19480#define RBIMPL_COMPILER_IS_GCC_H
19481#define RBIMPL_COMPILER_IS_INTEL_H
19482#define RBIMPL_COMPILER_IS_Intel 0
19483#define RBIMPL_COMPILER_IS_GCC 1
19484#define RBIMPL_COMPILER_VERSION_MAJOR __GNUC__
19485#define RBIMPL_COMPILER_VERSION_MINOR __GNUC_MINOR__
19486#define RBIMPL_COMPILER_VERSION_PATCH __GNUC_PATCHLEVEL__
19487#define RBIMPL_COMPILER_IS_MSVC_H
19488#define RBIMPL_COMPILER_IS_MSVC 0
19489#define RBIMPL_COMPILER_IS_SUNPRO_H
19490#define RBIMPL_COMPILER_IS_SunPro 0
19491#define RBIMPL_COMPILER_SINCE(cc,x,y,z) (RBIMPL_COMPILER_IS(cc) && ((RBIMPL_COMPILER_VERSION_MAJOR > (x)) || ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && ((RBIMPL_COMPILER_VERSION_MINOR > (y)) || ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && (RBIMPL_COMPILER_VERSION_PATCH >= (z)))))))
19492#define RBIMPL_COMPILER_BEFORE(cc,x,y,z) (RBIMPL_COMPILER_IS(cc) && ((RBIMPL_COMPILER_VERSION_MAJOR < (x)) || ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && ((RBIMPL_COMPILER_VERSION_MINOR < (y)) || ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && (RBIMPL_COMPILER_VERSION_PATCH < (z)))))))
19493#undef HAVE_PROTOTYPES
19494#define HAVE_PROTOTYPES 1
19495#undef HAVE_STDARG_PROTOTYPES
19496#define HAVE_STDARG_PROTOTYPES 1
19497#undef TOKEN_PASTE
19498#define TOKEN_PASTE(x,y) x ##y
19499#define STRINGIZE(expr) STRINGIZE0(expr)
19500#define STRINGIZE0(expr) #expr
19501#define UNALIGNED_WORD_ACCESS 1
19502#define RBIMPL_TEST3(q,w,e,...) e
19503#define RBIMPL_TEST2(...) RBIMPL_TEST3(__VA_OPT__(,),1,0,0)
19504#define RBIMPL_TEST1() RBIMPL_TEST2("ruby")
19505#define HAVE___VA_OPT__
19506#undef RBIMPL_TEST1
19507#undef RBIMPL_TEST2
19508#undef RBIMPL_TEST3
19509#define _STDARG_H
19510#define _ANSI_STDARG_H_
19511#undef __need___va_list
19512#define __GNUC_VA_LIST
19513#define va_start(v,l) __builtin_va_start(v,l)
19514#define va_end(v) __builtin_va_end(v)
19515#define va_arg(v,l) __builtin_va_arg(v,l)
19516#define va_copy(d,s) __builtin_va_copy(d,s)
19517#define __va_copy(d,s) __builtin_va_copy(d,s)
19518#define _VA_LIST_
19519#define _VA_LIST
19520#define _VA_LIST_DEFINED
19521#define _VA_LIST_T_H
19522#define __va_list__
19523#define RUBY_DEFINES_H 1
19524#define _STDIO_H 1
19525#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
19526#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
19527#define _FEATURES_H 1
19528#undef __USE_ISOC11
19529#undef __USE_ISOC99
19530#undef __USE_ISOC95
19531#undef __USE_ISOCXX11
19532#undef __USE_POSIX
19533#undef __USE_POSIX2
19534#undef __USE_POSIX199309
19535#undef __USE_POSIX199506
19536#undef __USE_XOPEN
19537#undef __USE_XOPEN_EXTENDED
19538#undef __USE_UNIX98
19539#undef __USE_XOPEN2K
19540#undef __USE_XOPEN2KXSI
19541#undef __USE_XOPEN2K8
19542#undef __USE_XOPEN2K8XSI
19543#undef __USE_LARGEFILE
19544#undef __USE_LARGEFILE64
19545#undef __USE_FILE_OFFSET64
19546#undef __USE_MISC
19547#undef __USE_ATFILE
19548#undef __USE_GNU
19549#undef __USE_FORTIFY_LEVEL
19550#undef __KERNEL_STRICT_NAMES
19551#undef __GLIBC_USE_ISOC2X
19552#undef __GLIBC_USE_DEPRECATED_GETS
19553#undef __GLIBC_USE_DEPRECATED_SCANF
19554#define __KERNEL_STRICT_NAMES
19555#define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
19556#define __glibc_clang_prereq(maj,min) 0
19557#define __GLIBC_USE(F) __GLIBC_USE_ ## F
19558#undef _ISOC95_SOURCE
19559#define _ISOC95_SOURCE 1
19560#undef _ISOC99_SOURCE
19561#define _ISOC99_SOURCE 1
19562#undef _ISOC11_SOURCE
19563#define _ISOC11_SOURCE 1
19564#undef _ISOC2X_SOURCE
19565#define _ISOC2X_SOURCE 1
19566#undef _POSIX_SOURCE
19567#define _POSIX_SOURCE 1
19568#undef _POSIX_C_SOURCE
19569#define _POSIX_C_SOURCE 200809L
19570#undef _XOPEN_SOURCE
19571#define _XOPEN_SOURCE 700
19572#undef _XOPEN_SOURCE_EXTENDED
19573#define _XOPEN_SOURCE_EXTENDED 1
19574#undef _LARGEFILE64_SOURCE
19575#define _LARGEFILE64_SOURCE 1
19576#undef _DEFAULT_SOURCE
19577#define _DEFAULT_SOURCE 1
19578#undef _ATFILE_SOURCE
19579#define _ATFILE_SOURCE 1
19580#undef _DEFAULT_SOURCE
19581#define _DEFAULT_SOURCE 1
19582#define __GLIBC_USE_ISOC2X 1
19583#define __USE_ISOC11 1
19584#define __USE_ISOC99 1
19585#define __USE_ISOC95 1
19586#undef _POSIX_SOURCE
19587#define _POSIX_SOURCE 1
19588#undef _POSIX_C_SOURCE
19589#define _POSIX_C_SOURCE 200809L
19590#define __USE_POSIX 1
19591#define __USE_POSIX2 1
19592#define __USE_POSIX199309 1
19593#define __USE_POSIX199506 1
19594#define __USE_XOPEN2K 1
19595#undef __USE_ISOC95
19596#define __USE_ISOC95 1
19597#undef __USE_ISOC99
19598#define __USE_ISOC99 1
19599#define __USE_XOPEN2K8 1
19600#undef _ATFILE_SOURCE
19601#define _ATFILE_SOURCE 1
19602#define __USE_XOPEN 1
19603#define __USE_XOPEN_EXTENDED 1
19604#define __USE_UNIX98 1
19605#undef _LARGEFILE_SOURCE
19606#define _LARGEFILE_SOURCE 1
19607#define __USE_XOPEN2K8 1
19608#define __USE_XOPEN2K8XSI 1
19609#define __USE_XOPEN2K 1
19610#define __USE_XOPEN2KXSI 1
19611#undef __USE_ISOC95
19612#define __USE_ISOC95 1
19613#undef __USE_ISOC99
19614#define __USE_ISOC99 1
19615#define __USE_LARGEFILE 1
19616#define __USE_LARGEFILE64 1
19617#define __USE_MISC 1
19618#define __USE_ATFILE 1
19619#define __USE_GNU 1
19620#define __USE_FORTIFY_LEVEL 2
19621#define __GLIBC_USE_DEPRECATED_GETS 0
19622#define __GLIBC_USE_DEPRECATED_SCANF 0
19623#undef __GNU_LIBRARY__
19624#define __GNU_LIBRARY__ 6
19625#define __GLIBC__ 2
19626#define __GLIBC_MINOR__ 33
19627#define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
19628#define _SYS_CDEFS_H 1
19629#undef __P
19630#undef __PMT
19631#define __LEAF , __leaf__
19632#define __LEAF_ATTR __attribute__ ((__leaf__))
19633#define __THROW __attribute__ ((__nothrow__ __LEAF))
19634#define __THROWNL __attribute__ ((__nothrow__))
19635#define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
19636#define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
19637#define __glibc_clang_has_extension(ext) 0
19638#define __P(args) args
19639#define __PMT(args) args
19640#define __CONCAT(x,y) x ## y
19641#define __STRING(x) #x
19642#define __ptr_t void *
19643#define __BEGIN_DECLS
19644#define __END_DECLS
19645#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
19646#define __bos0(ptr) __builtin_object_size (ptr, 0)
19647#define __glibc_objsize0(__o) __bos0 (__o)
19648#define __glibc_objsize(__o) __bos (__o)
19649#define __warnattr(msg) __attribute__((__warning__ (msg)))
19650#define __errordecl(name,msg) extern void name (void) __attribute__((__error__ (msg)))
19651#define __flexarr []
19652#define __glibc_c99_flexarr_available 1
19653#define __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias))
19654#define __REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW
19655#define __REDIRECT_NTHNL(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROWNL
19656#define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
19657#define __ASMNAME2(prefix,cname) __STRING (prefix) cname
19658#define __attribute_malloc__ __attribute__ ((__malloc__))
19659#define __attribute_alloc_size__(params) __attribute__ ((__alloc_size__ params))
19660#define __attribute_pure__ __attribute__ ((__pure__))
19661#define __attribute_const__ __attribute__ ((__const__))
19662#define __attribute_used__ __attribute__ ((__used__))
19663#define __attribute_noinline__ __attribute__ ((__noinline__))
19664#define __attribute_deprecated__ __attribute__ ((__deprecated__))
19665#define __attribute_deprecated_msg__(msg) __attribute__ ((__deprecated__ (msg)))
19666#define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
19667#define __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b)))
19668#define __nonnull(params) __attribute__ ((__nonnull__ params))
19669#define __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__))
19670#define __wur __attribute_warn_unused_result__
19671#undef __always_inline
19672#define __always_inline __inline __attribute__ ((__always_inline__))
19673#define __attribute_artificial__ __attribute__ ((__artificial__))
19674#define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
19675#define __extern_always_inline extern __always_inline __attribute__ ((__gnu_inline__))
19676#define __fortify_function __extern_always_inline __attribute_artificial__
19677#define __va_arg_pack() __builtin_va_arg_pack ()
19678#define __va_arg_pack_len() __builtin_va_arg_pack_len ()
19679#define __restrict_arr __restrict
19680#define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
19681#define __glibc_likely(cond) __builtin_expect ((cond), 1)
19682#define __glibc_has_attribute(attr) __has_attribute (attr)
19683#define __attribute_nonstring__ __attribute__ ((__nonstring__))
19684#undef __attribute_copy__
19685#define __attribute_copy__(arg) __attribute__ ((__copy__ (arg)))
19686#define __WORDSIZE 64
19687#define __WORDSIZE_TIME64_COMPAT32 1
19688#define __SYSCALL_WORDSIZE 64
19689#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
19690#define __LDBL_REDIR1(name,proto,alias) name proto
19691#define __LDBL_REDIR(name,proto) name proto
19692#define __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW
19693#define __LDBL_REDIR_NTH(name,proto) name proto __THROW
19694#define __LDBL_REDIR2_DECL(name)
19695#define __LDBL_REDIR_DECL(name)
19696#define __REDIRECT_LDBL(name,proto,alias) __REDIRECT (name, proto, alias)
19697#define __REDIRECT_NTH_LDBL(name,proto,alias) __REDIRECT_NTH (name, proto, alias)
19698#define __glibc_macro_warning1(message) _Pragma (#message)
19699#define __glibc_macro_warning(message) __glibc_macro_warning1 (GCC warning message)
19700#define __HAVE_GENERIC_SELECTION 1
19701#define __attr_access(x) __attribute__ ((__access__ x))
19702#define __attribute_returns_twice__ __attribute__ ((__returns_twice__))
19703#define __USE_EXTERN_INLINES 1
19704#define __stub___compat_bdflush
19705#define __stub_chflags
19706#define __stub_fchflags
19707#define __stub_gtty
19708#define __stub_revoke
19709#define __stub_setlogin
19710#define __stub_sigreturn
19711#define __stub_stty
19712#undef __GLIBC_USE_LIB_EXT2
19713#define __GLIBC_USE_LIB_EXT2 1
19714#undef __GLIBC_USE_IEC_60559_BFP_EXT
19715#define __GLIBC_USE_IEC_60559_BFP_EXT 1
19716#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
19717#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
19718#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
19719#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
19720#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
19721#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
19722#undef __GLIBC_USE_IEC_60559_TYPES_EXT
19723#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
19724#define __need_size_t
19725#define __need_NULL
19726#define __size_t__
19727#define __SIZE_T__
19728#define _SIZE_T
19729#define _SYS_SIZE_T_H
19730#define _T_SIZE_
19731#define _T_SIZE
19732#define __SIZE_T
19733#define _SIZE_T_
19734#define _BSD_SIZE_T_
19735#define _SIZE_T_DEFINED_
19736#define _SIZE_T_DEFINED
19737#define _BSD_SIZE_T_DEFINED_
19738#define _SIZE_T_DECLARED
19739#define ___int_size_t_h
19740#define _GCC_SIZE_T
19741#define _SIZET_
19742#define __size_t
19743#undef __need_size_t
19744#undef NULL
19745#define NULL ((void *)0)
19746#undef __need_NULL
19747#define __need___va_list
19748#define _BITS_TYPES_H 1
19749#define __WORDSIZE 64
19750#define __WORDSIZE_TIME64_COMPAT32 1
19751#define __SYSCALL_WORDSIZE 64
19752#define __TIMESIZE __WORDSIZE
19753#define __S16_TYPE short int
19754#define __U16_TYPE unsigned short int
19755#define __S32_TYPE int
19756#define __U32_TYPE unsigned int
19757#define __SLONGWORD_TYPE long int
19758#define __ULONGWORD_TYPE unsigned long int
19759#define __SQUAD_TYPE long int
19760#define __UQUAD_TYPE unsigned long int
19761#define __SWORD_TYPE long int
19762#define __UWORD_TYPE unsigned long int
19763#define __SLONG32_TYPE int
19764#define __ULONG32_TYPE unsigned int
19765#define __S64_TYPE long int
19766#define __U64_TYPE unsigned long int
19767#define __STD_TYPE typedef
19768#define _BITS_TYPESIZES_H 1
19769#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
19770#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
19771#define __DEV_T_TYPE __UQUAD_TYPE
19772#define __UID_T_TYPE __U32_TYPE
19773#define __GID_T_TYPE __U32_TYPE
19774#define __INO_T_TYPE __SYSCALL_ULONG_TYPE
19775#define __INO64_T_TYPE __UQUAD_TYPE
19776#define __MODE_T_TYPE __U32_TYPE
19777#define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE
19778#define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE
19779#define __OFF_T_TYPE __SYSCALL_SLONG_TYPE
19780#define __OFF64_T_TYPE __SQUAD_TYPE
19781#define __PID_T_TYPE __S32_TYPE
19782#define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE
19783#define __RLIM64_T_TYPE __UQUAD_TYPE
19784#define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE
19785#define __BLKCNT64_T_TYPE __SQUAD_TYPE
19786#define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE
19787#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
19788#define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE
19789#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
19790#define __ID_T_TYPE __U32_TYPE
19791#define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE
19792#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE
19793#define __USECONDS_T_TYPE __U32_TYPE
19794#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE
19795#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
19796#define __DADDR_T_TYPE __S32_TYPE
19797#define __KEY_T_TYPE __S32_TYPE
19798#define __CLOCKID_T_TYPE __S32_TYPE
19799#define __TIMER_T_TYPE void *
19800#define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE
19801#define __FSID_T_TYPE struct { int __val[2]; }
19802#define __SSIZE_T_TYPE __SWORD_TYPE
19803#define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE
19804#define __OFF_T_MATCHES_OFF64_T 1
19805#define __INO_T_MATCHES_INO64_T 1
19806#define __RLIM_T_MATCHES_RLIM64_T 1
19807#define __STATFS_MATCHES_STATFS64 1
19808#define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
19809#define __FD_SETSIZE 1024
19810#define _BITS_TIME64_H 1
19811#define __TIME64_T_TYPE __TIME_T_TYPE
19812#undef __STD_TYPE
19813#define _____fpos_t_defined 1
19814#define ____mbstate_t_defined 1
19815#define _____fpos64_t_defined 1
19816#define ____FILE_defined 1
19817#define __FILE_defined 1
19818#define __struct_FILE_defined 1
19819#define __getc_unlocked_body(_fp) (__glibc_unlikely ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end) ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++)
19820#define __putc_unlocked_body(_ch,_fp) (__glibc_unlikely ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) ? __overflow (_fp, (unsigned char) (_ch)) : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch)))
19821#define _IO_EOF_SEEN 0x0010
19822#define __feof_unlocked_body(_fp) (((_fp)->_flags & _IO_EOF_SEEN) != 0)
19823#define _IO_ERR_SEEN 0x0020
19824#define __ferror_unlocked_body(_fp) (((_fp)->_flags & _IO_ERR_SEEN) != 0)
19825#define _IO_USER_LOCK 0x8000
19826#define __cookie_io_functions_t_defined 1
19827#define __off_t_defined
19828#define __off64_t_defined
19829#define __ssize_t_defined
19830#define _IOFBF 0
19831#define _IOLBF 1
19832#define _IONBF 2
19833#define BUFSIZ 8192
19834#define EOF (-1)
19835#define SEEK_SET 0
19836#define SEEK_CUR 1
19837#define SEEK_END 2
19838#define SEEK_DATA 3
19839#define SEEK_HOLE 4
19840#define P_tmpdir "/tmp"
19841#define _BITS_STDIO_LIM_H 1
19842#define L_tmpnam 20
19843#define TMP_MAX 238328
19844#define FILENAME_MAX 4096
19845#define L_ctermid 9
19846#define L_cuserid 9
19847#undef FOPEN_MAX
19848#define FOPEN_MAX 16
19849#define stdin stdin
19850#define stdout stdout
19851#define stderr stderr
19852#define RENAME_NOREPLACE (1 << 0)
19853#define RENAME_EXCHANGE (1 << 1)
19854#define RENAME_WHITEOUT (1 << 2)
19855#define _BITS_FLOATN_H
19856#define __HAVE_FLOAT128 1
19857#define __HAVE_DISTINCT_FLOAT128 1
19858#define __HAVE_FLOAT64X 1
19859#define __HAVE_FLOAT64X_LONG_DOUBLE 1
19860#define __f128(x) x ##f128
19861#define __CFLOAT128 _Complex _Float128
19862#define _BITS_FLOATN_COMMON_H
19863#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
19864#define __HAVE_FLOAT16 0
19865#define __HAVE_FLOAT32 1
19866#define __HAVE_FLOAT64 1
19867#define __HAVE_FLOAT32X 1
19868#define __HAVE_FLOAT128X 0
19869#define __HAVE_DISTINCT_FLOAT16 __HAVE_FLOAT16
19870#define __HAVE_DISTINCT_FLOAT32 0
19871#define __HAVE_DISTINCT_FLOAT64 0
19872#define __HAVE_DISTINCT_FLOAT32X 0
19873#define __HAVE_DISTINCT_FLOAT64X 0
19874#define __HAVE_DISTINCT_FLOAT128X __HAVE_FLOAT128X
19875#define __HAVE_FLOAT128_UNLIKE_LDBL (__HAVE_DISTINCT_FLOAT128 && __LDBL_MANT_DIG__ != 113)
19876#define __HAVE_FLOATN_NOT_TYPEDEF 1
19877#define __f32(x) x ##f32
19878#define __f64(x) x ##f64
19879#define __f32x(x) x ##f32x
19880#define __f64x(x) x ##f64x
19881#define __CFLOAT32 _Complex _Float32
19882#define __CFLOAT64 _Complex _Float64
19883#define __CFLOAT32X _Complex _Float32x
19884#define __CFLOAT64X _Complex _Float64x
19885#define _BITS_STDIO_H 1
19886#define __STDIO_INLINE __extern_inline
19887#define fread_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ char *__ptr = (char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) { int __c = getc_unlocked (__stream); if (__c == EOF) break; *__ptr++ = __c; } ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fread_unlocked (ptr, size, n, stream))))
19888#define fwrite_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ const char *__ptr = (const char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) if (putc_unlocked (*__ptr++, __stream) == EOF) break; ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fwrite_unlocked (ptr, size, n, stream))))
19889#undef __STDIO_INLINE
19890#define _BITS_STDIO2_H 1
19891#undef fread_unlocked
19892#define _SYS_TYPES_H 1
19893#define __u_char_defined
19894#define __ino_t_defined
19895#define __ino64_t_defined
19896#define __dev_t_defined
19897#define __gid_t_defined
19898#define __mode_t_defined
19899#define __nlink_t_defined
19900#define __uid_t_defined
19901#define __pid_t_defined
19902#define __id_t_defined
19903#define __daddr_t_defined
19904#define __key_t_defined
19905#define __clock_t_defined 1
19906#define __clockid_t_defined 1
19907#define __time_t_defined 1
19908#define __timer_t_defined 1
19909#define __useconds_t_defined
19910#define __suseconds_t_defined
19911#define __need_size_t
19912#undef __need_size_t
19913#undef __need_NULL
19914#define _BITS_STDINT_INTN_H 1
19915#define __BIT_TYPES_DEFINED__ 1
19916#define _ENDIAN_H 1
19917#define _BITS_ENDIAN_H 1
19918#define __LITTLE_ENDIAN 1234
19919#define __BIG_ENDIAN 4321
19920#define __PDP_ENDIAN 3412
19921#define _BITS_ENDIANNESS_H 1
19922#define __BYTE_ORDER __LITTLE_ENDIAN
19923#define __FLOAT_WORD_ORDER __BYTE_ORDER
19924#define __LONG_LONG_PAIR(HI,LO) LO, HI
19925#define LITTLE_ENDIAN __LITTLE_ENDIAN
19926#define BIG_ENDIAN __BIG_ENDIAN
19927#define PDP_ENDIAN __PDP_ENDIAN
19928#define BYTE_ORDER __BYTE_ORDER
19929#define _BITS_BYTESWAP_H 1
19930#define __bswap_constant_16(x) ((__uint16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
19931#define __bswap_constant_32(x) ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
19932#define __bswap_constant_64(x) ((((x) & 0xff00000000000000ull) >> 56) | (((x) & 0x00ff000000000000ull) >> 40) | (((x) & 0x0000ff0000000000ull) >> 24) | (((x) & 0x000000ff00000000ull) >> 8) | (((x) & 0x00000000ff000000ull) << 8) | (((x) & 0x0000000000ff0000ull) << 24) | (((x) & 0x000000000000ff00ull) << 40) | (((x) & 0x00000000000000ffull) << 56))
19933#define _BITS_UINTN_IDENTITY_H 1
19934#define htobe16(x) __bswap_16 (x)
19935#define htole16(x) __uint16_identity (x)
19936#define be16toh(x) __bswap_16 (x)
19937#define le16toh(x) __uint16_identity (x)
19938#define htobe32(x) __bswap_32 (x)
19939#define htole32(x) __uint32_identity (x)
19940#define be32toh(x) __bswap_32 (x)
19941#define le32toh(x) __uint32_identity (x)
19942#define htobe64(x) __bswap_64 (x)
19943#define htole64(x) __uint64_identity (x)
19944#define be64toh(x) __bswap_64 (x)
19945#define le64toh(x) __uint64_identity (x)
19946#define _SYS_SELECT_H 1
19947#define __FD_ZERO(s) do { unsigned int __i; fd_set *__arr = (s); for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) __FDS_BITS (__arr)[__i] = 0; } while (0)
19948#define __FD_SET(d,s) ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
19949#define __FD_CLR(d,s) ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
19950#define __FD_ISSET(d,s) ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
19951#define __sigset_t_defined 1
19952#define ____sigset_t_defined
19953#define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))
19954#define __timeval_defined 1
19955#define _STRUCT_TIMESPEC 1
19956#undef __NFDBITS
19957#define __NFDBITS (8 * (int) sizeof (__fd_mask))
19958#define __FD_ELT(d) ((d) / __NFDBITS)
19959#define __FD_MASK(d) ((__fd_mask) (1UL << ((d) % __NFDBITS)))
19960#define __FDS_BITS(set) ((set)->fds_bits)
19961#define FD_SETSIZE __FD_SETSIZE
19962#define NFDBITS __NFDBITS
19963#define FD_SET(fd,fdsetp) __FD_SET (fd, fdsetp)
19964#define FD_CLR(fd,fdsetp) __FD_CLR (fd, fdsetp)
19965#define FD_ISSET(fd,fdsetp) __FD_ISSET (fd, fdsetp)
19966#define FD_ZERO(fdsetp) __FD_ZERO (fdsetp)
19967#undef __FD_ELT
19968#define __FD_ELT(d) __extension__ ({ long int __d = (d); (__builtin_constant_p (__d) ? (0 <= __d && __d < __FD_SETSIZE ? (__d / __NFDBITS) : __fdelt_warn (__d)) : __fdelt_chk (__d)); })
19969#define __blksize_t_defined
19970#define __blkcnt_t_defined
19971#define __fsblkcnt_t_defined
19972#define __fsfilcnt_t_defined
19973#define _BITS_PTHREADTYPES_COMMON_H 1
19974#define _THREAD_SHARED_TYPES_H 1
19975#define _BITS_PTHREADTYPES_ARCH_H 1
19976#define __WORDSIZE 64
19977#define __WORDSIZE_TIME64_COMPAT32 1
19978#define __SYSCALL_WORDSIZE 64
19979#define __SIZEOF_PTHREAD_MUTEX_T 40
19980#define __SIZEOF_PTHREAD_ATTR_T 56
19981#define __SIZEOF_PTHREAD_RWLOCK_T 56
19982#define __SIZEOF_PTHREAD_BARRIER_T 32
19983#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
19984#define __SIZEOF_PTHREAD_COND_T 48
19985#define __SIZEOF_PTHREAD_CONDATTR_T 4
19986#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
19987#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
19988#define __LOCK_ALIGNMENT
19989#define __ONCE_ALIGNMENT
19990#define _THREAD_MUTEX_INTERNAL_H 1
19991#define __PTHREAD_MUTEX_HAVE_PREV 1
19992#define __PTHREAD_MUTEX_INITIALIZER(__kind) 0, 0, 0, 0, __kind, 0, 0, { 0, 0 }
19993#define _RWLOCK_INTERNAL_H
19994#define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
19995#define __PTHREAD_RWLOCK_INITIALIZER(__flags) 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
19996#define __ONCE_FLAG_INIT { 0 }
19997#define __have_pthread_attr_t 1
19998#define _SYS_STAT_H 1
19999#define _BITS_STAT_H 1
20000#define _BITS_STRUCT_STAT_H 1
20001#define st_atime st_atim.tv_sec
20002#define st_mtime st_mtim.tv_sec
20003#define st_ctime st_ctim.tv_sec
20004#define _STATBUF_ST_BLKSIZE
20005#define _STATBUF_ST_RDEV
20006#define _STATBUF_ST_NSEC
20007#define __S_IFMT 0170000
20008#define __S_IFDIR 0040000
20009#define __S_IFCHR 0020000
20010#define __S_IFBLK 0060000
20011#define __S_IFREG 0100000
20012#define __S_IFIFO 0010000
20013#define __S_IFLNK 0120000
20014#define __S_IFSOCK 0140000
20015#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
20016#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
20017#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
20018#define __S_ISUID 04000
20019#define __S_ISGID 02000
20020#define __S_ISVTX 01000
20021#define __S_IREAD 0400
20022#define __S_IWRITE 0200
20023#define __S_IEXEC 0100
20024#define UTIME_NOW ((1l << 30) - 1l)
20025#define UTIME_OMIT ((1l << 30) - 2l)
20026#define S_IFMT __S_IFMT
20027#define S_IFDIR __S_IFDIR
20028#define S_IFCHR __S_IFCHR
20029#define S_IFBLK __S_IFBLK
20030#define S_IFREG __S_IFREG
20031#define S_IFIFO __S_IFIFO
20032#define S_IFLNK __S_IFLNK
20033#define S_IFSOCK __S_IFSOCK
20034#define __S_ISTYPE(mode,mask) (((mode) & __S_IFMT) == (mask))
20035#define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR)
20036#define S_ISCHR(mode) __S_ISTYPE((mode), __S_IFCHR)
20037#define S_ISBLK(mode) __S_ISTYPE((mode), __S_IFBLK)
20038#define S_ISREG(mode) __S_ISTYPE((mode), __S_IFREG)
20039#define S_ISFIFO(mode) __S_ISTYPE((mode), __S_IFIFO)
20040#define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK)
20041#define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
20042#define S_TYPEISMQ(buf) __S_TYPEISMQ(buf)
20043#define S_TYPEISSEM(buf) __S_TYPEISSEM(buf)
20044#define S_TYPEISSHM(buf) __S_TYPEISSHM(buf)
20045#define S_ISUID __S_ISUID
20046#define S_ISGID __S_ISGID
20047#define S_ISVTX __S_ISVTX
20048#define S_IRUSR __S_IREAD
20049#define S_IWUSR __S_IWRITE
20050#define S_IXUSR __S_IEXEC
20051#define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC)
20052#define S_IREAD S_IRUSR
20053#define S_IWRITE S_IWUSR
20054#define S_IEXEC S_IXUSR
20055#define S_IRGRP (S_IRUSR >> 3)
20056#define S_IWGRP (S_IWUSR >> 3)
20057#define S_IXGRP (S_IXUSR >> 3)
20058#define S_IRWXG (S_IRWXU >> 3)
20059#define S_IROTH (S_IRGRP >> 3)
20060#define S_IWOTH (S_IWGRP >> 3)
20061#define S_IXOTH (S_IXGRP >> 3)
20062#define S_IRWXO (S_IRWXG >> 3)
20063#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
20064#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
20065#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
20066#define S_BLKSIZE 512
20067#define _LINUX_STAT_H
20068#define _LINUX_TYPES_H
20069#define _ASM_GENERIC_TYPES_H
20070#define _ASM_GENERIC_INT_LL64_H
20071#define __ASM_X86_BITSPERLONG_H
20072#define __BITS_PER_LONG 64
20073#define __ASM_GENERIC_BITS_PER_LONG
20074#define _LINUX_POSIX_TYPES_H
20075#undef __FD_SETSIZE
20076#define __FD_SETSIZE 1024
20077#define _ASM_X86_POSIX_TYPES_64_H
20078#define __kernel_old_uid_t __kernel_old_uid_t
20079#define __kernel_old_dev_t __kernel_old_dev_t
20080#define __ASM_GENERIC_POSIX_TYPES_H
20081#define __bitwise__
20082#define __bitwise __bitwise__
20083#define __aligned_u64 __u64 __attribute__((aligned(8)))
20084#define __aligned_be64 __be64 __attribute__((aligned(8)))
20085#define __aligned_le64 __le64 __attribute__((aligned(8)))
20086#define STATX_TYPE 0x00000001U
20087#define STATX_MODE 0x00000002U
20088#define STATX_NLINK 0x00000004U
20089#define STATX_UID 0x00000008U
20090#define STATX_GID 0x00000010U
20091#define STATX_ATIME 0x00000020U
20092#define STATX_MTIME 0x00000040U
20093#define STATX_CTIME 0x00000080U
20094#define STATX_INO 0x00000100U
20095#define STATX_SIZE 0x00000200U
20096#define STATX_BLOCKS 0x00000400U
20097#define STATX_BASIC_STATS 0x000007ffU
20098#define STATX_BTIME 0x00000800U
20099#define STATX_MNT_ID 0x00001000U
20100#define STATX__RESERVED 0x80000000U
20101#define STATX_ALL 0x00000fffU
20102#define STATX_ATTR_COMPRESSED 0x00000004
20103#define STATX_ATTR_IMMUTABLE 0x00000010
20104#define STATX_ATTR_APPEND 0x00000020
20105#define STATX_ATTR_NODUMP 0x00000040
20106#define STATX_ATTR_ENCRYPTED 0x00000800
20107#define STATX_ATTR_AUTOMOUNT 0x00001000
20108#define STATX_ATTR_MOUNT_ROOT 0x00002000
20109#define STATX_ATTR_VERITY 0x00100000
20110#define STATX_ATTR_DAX 0x00200000
20111#define __statx_timestamp_defined 1
20112#define __statx_defined 1
20113#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
20114#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
20115#undef __GLIBC_USE_LIB_EXT2
20116#define __GLIBC_USE_LIB_EXT2 1
20117#undef __GLIBC_USE_IEC_60559_BFP_EXT
20118#define __GLIBC_USE_IEC_60559_BFP_EXT 1
20119#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
20120#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
20121#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
20122#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
20123#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
20124#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
20125#undef __GLIBC_USE_IEC_60559_TYPES_EXT
20126#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
20127#define __need_size_t
20128#define __need_wchar_t
20129#define __need_NULL
20130#undef __need_size_t
20131#define __wchar_t__
20132#define __WCHAR_T__
20133#define _WCHAR_T
20134#define _T_WCHAR_
20135#define _T_WCHAR
20136#define __WCHAR_T
20137#define _WCHAR_T_
20138#define _BSD_WCHAR_T_
20139#define _WCHAR_T_DEFINED_
20140#define _WCHAR_T_DEFINED
20141#define _WCHAR_T_H
20142#define ___int_wchar_t_h
20143#define __INT_WCHAR_T_H
20144#define _GCC_WCHAR_T
20145#define _WCHAR_T_DECLARED
20146#undef _BSD_WCHAR_T_
20147#undef __need_wchar_t
20148#undef NULL
20149#define NULL ((void *)0)
20150#undef __need_NULL
20151#define _STDLIB_H 1
20152#define WNOHANG 1
20153#define WUNTRACED 2
20154#define WSTOPPED 2
20155#define WEXITED 4
20156#define WCONTINUED 8
20157#define WNOWAIT 0x01000000
20158#define __WNOTHREAD 0x20000000
20159#define __WALL 0x40000000
20160#define __WCLONE 0x80000000
20161#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)
20162#define __WTERMSIG(status) ((status) & 0x7f)
20163#define __WSTOPSIG(status) __WEXITSTATUS(status)
20164#define __WIFEXITED(status) (__WTERMSIG(status) == 0)
20165#define __WIFSIGNALED(status) (((signed char) (((status) & 0x7f) + 1) >> 1) > 0)
20166#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
20167#define __WIFCONTINUED(status) ((status) == __W_CONTINUED)
20168#define __WCOREDUMP(status) ((status) & __WCOREFLAG)
20169#define __W_EXITCODE(ret,sig) ((ret) << 8 | (sig))
20170#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f)
20171#define __W_CONTINUED 0xffff
20172#define __WCOREFLAG 0x80
20173#define WEXITSTATUS(status) __WEXITSTATUS (status)
20174#define WTERMSIG(status) __WTERMSIG (status)
20175#define WSTOPSIG(status) __WSTOPSIG (status)
20176#define WIFEXITED(status) __WIFEXITED (status)
20177#define WIFSIGNALED(status) __WIFSIGNALED (status)
20178#define WIFSTOPPED(status) __WIFSTOPPED (status)
20179#define WIFCONTINUED(status) __WIFCONTINUED (status)
20180#define __ldiv_t_defined 1
20181#define __lldiv_t_defined 1
20182#define RAND_MAX 2147483647
20183#define EXIT_FAILURE 1
20184#define EXIT_SUCCESS 0
20185#define MB_CUR_MAX (__ctype_get_mb_cur_max ())
20186#define _BITS_TYPES_LOCALE_T_H 1
20187#define _BITS_TYPES___LOCALE_T_H 1
20188#define _ALLOCA_H 1
20189#define __need_size_t
20190#undef __need_size_t
20191#undef __need_NULL
20192#undef alloca
20193#define alloca(size) __builtin_alloca (size)
20194#define __COMPAR_FN_T
20195#define __STDLIB_MB_LEN_MAX 16
20196#define _STDDEF_H
20197#define _STDDEF_H_
20198#define _ANSI_STDDEF_H
20199#define _PTRDIFF_T
20200#define _T_PTRDIFF_
20201#define _T_PTRDIFF
20202#define __PTRDIFF_T
20203#define _PTRDIFF_T_
20204#define _BSD_PTRDIFF_T_
20205#define ___int_ptrdiff_t_h
20206#define _GCC_PTRDIFF_T
20207#define _PTRDIFF_T_DECLARED
20208#undef __need_ptrdiff_t
20209#undef __need_size_t
20210#undef __need_wchar_t
20211#undef NULL
20212#define NULL ((void *)0)
20213#undef __need_NULL
20214#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
20215#define _STRING_H 1
20216#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
20217#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
20218#undef __GLIBC_USE_LIB_EXT2
20219#define __GLIBC_USE_LIB_EXT2 1
20220#undef __GLIBC_USE_IEC_60559_BFP_EXT
20221#define __GLIBC_USE_IEC_60559_BFP_EXT 1
20222#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
20223#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
20224#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
20225#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
20226#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
20227#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
20228#undef __GLIBC_USE_IEC_60559_TYPES_EXT
20229#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
20230#define __need_size_t
20231#define __need_NULL
20232#undef __need_ptrdiff_t
20233#undef __need_size_t
20234#undef __need_wchar_t
20235#undef NULL
20236#define NULL ((void *)0)
20237#undef __need_NULL
20238#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
20239#define strdupa(s) (__extension__ ({ const char *__old = (s); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); }))
20240#define strndupa(s,n) (__extension__ ({ const char *__old = (s); size_t __len = strnlen (__old, (n)); char *__new = (char *) __builtin_alloca (__len + 1); __new[__len] = '\0'; (char *) memcpy (__new, __old, __len); }))
20241#define _STRINGS_H 1
20242#define __need_size_t
20243#undef __need_ptrdiff_t
20244#undef __need_size_t
20245#undef __need_wchar_t
20246#undef NULL
20247#define NULL ((void *)0)
20248#undef __need_NULL
20249#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
20250#define __STRINGS_FORTIFIED 1
20251#define _BITS_STRING_FORTIFIED_H 1
20252#define _INTTYPES_H 1
20253#define _STDINT_H 1
20254#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
20255#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
20256#undef __GLIBC_USE_LIB_EXT2
20257#define __GLIBC_USE_LIB_EXT2 1
20258#undef __GLIBC_USE_IEC_60559_BFP_EXT
20259#define __GLIBC_USE_IEC_60559_BFP_EXT 1
20260#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
20261#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
20262#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
20263#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
20264#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
20265#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
20266#undef __GLIBC_USE_IEC_60559_TYPES_EXT
20267#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
20268#define _BITS_WCHAR_H 1
20269#define __WCHAR_MAX __WCHAR_MAX__
20270#define __WCHAR_MIN __WCHAR_MIN__
20271#define __WORDSIZE 64
20272#define __WORDSIZE_TIME64_COMPAT32 1
20273#define __SYSCALL_WORDSIZE 64
20274#define _BITS_STDINT_UINTN_H 1
20275#define __intptr_t_defined
20276#define __INT64_C(c) c ## L
20277#define __UINT64_C(c) c ## UL
20278#define INT8_MIN (-128)
20279#define INT16_MIN (-32767-1)
20280#define INT32_MIN (-2147483647-1)
20281#define INT64_MIN (-__INT64_C(9223372036854775807)-1)
20282#define INT8_MAX (127)
20283#define INT16_MAX (32767)
20284#define INT32_MAX (2147483647)
20285#define INT64_MAX (__INT64_C(9223372036854775807))
20286#define UINT8_MAX (255)
20287#define UINT16_MAX (65535)
20288#define UINT32_MAX (4294967295U)
20289#define UINT64_MAX (__UINT64_C(18446744073709551615))
20290#define INT_LEAST8_MIN (-128)
20291#define INT_LEAST16_MIN (-32767-1)
20292#define INT_LEAST32_MIN (-2147483647-1)
20293#define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1)
20294#define INT_LEAST8_MAX (127)
20295#define INT_LEAST16_MAX (32767)
20296#define INT_LEAST32_MAX (2147483647)
20297#define INT_LEAST64_MAX (__INT64_C(9223372036854775807))
20298#define UINT_LEAST8_MAX (255)
20299#define UINT_LEAST16_MAX (65535)
20300#define UINT_LEAST32_MAX (4294967295U)
20301#define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615))
20302#define INT_FAST8_MIN (-128)
20303#define INT_FAST16_MIN (-9223372036854775807L-1)
20304#define INT_FAST32_MIN (-9223372036854775807L-1)
20305#define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1)
20306#define INT_FAST8_MAX (127)
20307#define INT_FAST16_MAX (9223372036854775807L)
20308#define INT_FAST32_MAX (9223372036854775807L)
20309#define INT_FAST64_MAX (__INT64_C(9223372036854775807))
20310#define UINT_FAST8_MAX (255)
20311#define UINT_FAST16_MAX (18446744073709551615UL)
20312#define UINT_FAST32_MAX (18446744073709551615UL)
20313#define UINT_FAST64_MAX (__UINT64_C(18446744073709551615))
20314#define INTPTR_MIN (-9223372036854775807L-1)
20315#define INTPTR_MAX (9223372036854775807L)
20316#define UINTPTR_MAX (18446744073709551615UL)
20317#define INTMAX_MIN (-__INT64_C(9223372036854775807)-1)
20318#define INTMAX_MAX (__INT64_C(9223372036854775807))
20319#define UINTMAX_MAX (__UINT64_C(18446744073709551615))
20320#define PTRDIFF_MIN (-9223372036854775807L-1)
20321#define PTRDIFF_MAX (9223372036854775807L)
20322#define SIG_ATOMIC_MIN (-2147483647-1)
20323#define SIG_ATOMIC_MAX (2147483647)
20324#define SIZE_MAX (18446744073709551615UL)
20325#define WCHAR_MIN __WCHAR_MIN
20326#define WCHAR_MAX __WCHAR_MAX
20327#define WINT_MIN (0u)
20328#define WINT_MAX (4294967295u)
20329#define INT8_C(c) c
20330#define INT16_C(c) c
20331#define INT32_C(c) c
20332#define INT64_C(c) c ## L
20333#define UINT8_C(c) c
20334#define UINT16_C(c) c
20335#define UINT32_C(c) c ## U
20336#define UINT64_C(c) c ## UL
20337#define INTMAX_C(c) c ## L
20338#define UINTMAX_C(c) c ## UL
20339#define INT8_WIDTH 8
20340#define UINT8_WIDTH 8
20341#define INT16_WIDTH 16
20342#define UINT16_WIDTH 16
20343#define INT32_WIDTH 32
20344#define UINT32_WIDTH 32
20345#define INT64_WIDTH 64
20346#define UINT64_WIDTH 64
20347#define INT_LEAST8_WIDTH 8
20348#define UINT_LEAST8_WIDTH 8
20349#define INT_LEAST16_WIDTH 16
20350#define UINT_LEAST16_WIDTH 16
20351#define INT_LEAST32_WIDTH 32
20352#define UINT_LEAST32_WIDTH 32
20353#define INT_LEAST64_WIDTH 64
20354#define UINT_LEAST64_WIDTH 64
20355#define INT_FAST8_WIDTH 8
20356#define UINT_FAST8_WIDTH 8
20357#define INT_FAST16_WIDTH __WORDSIZE
20358#define UINT_FAST16_WIDTH __WORDSIZE
20359#define INT_FAST32_WIDTH __WORDSIZE
20360#define UINT_FAST32_WIDTH __WORDSIZE
20361#define INT_FAST64_WIDTH 64
20362#define UINT_FAST64_WIDTH 64
20363#define INTPTR_WIDTH __WORDSIZE
20364#define UINTPTR_WIDTH __WORDSIZE
20365#define INTMAX_WIDTH 64
20366#define UINTMAX_WIDTH 64
20367#define PTRDIFF_WIDTH __WORDSIZE
20368#define SIG_ATOMIC_WIDTH 32
20369#define SIZE_WIDTH __WORDSIZE
20370#define WCHAR_WIDTH 32
20371#define WINT_WIDTH 32
20372#define _GCC_WRAP_STDINT_H
20373#define ____gwchar_t_defined 1
20374#define __PRI64_PREFIX "l"
20375#define __PRIPTR_PREFIX "l"
20376#define PRId8 "d"
20377#define PRId16 "d"
20378#define PRId32 "d"
20379#define PRId64 __PRI64_PREFIX "d"
20380#define PRIdLEAST8 "d"
20381#define PRIdLEAST16 "d"
20382#define PRIdLEAST32 "d"
20383#define PRIdLEAST64 __PRI64_PREFIX "d"
20384#define PRIdFAST8 "d"
20385#define PRIdFAST16 __PRIPTR_PREFIX "d"
20386#define PRIdFAST32 __PRIPTR_PREFIX "d"
20387#define PRIdFAST64 __PRI64_PREFIX "d"
20388#define PRIi8 "i"
20389#define PRIi16 "i"
20390#define PRIi32 "i"
20391#define PRIi64 __PRI64_PREFIX "i"
20392#define PRIiLEAST8 "i"
20393#define PRIiLEAST16 "i"
20394#define PRIiLEAST32 "i"
20395#define PRIiLEAST64 __PRI64_PREFIX "i"
20396#define PRIiFAST8 "i"
20397#define PRIiFAST16 __PRIPTR_PREFIX "i"
20398#define PRIiFAST32 __PRIPTR_PREFIX "i"
20399#define PRIiFAST64 __PRI64_PREFIX "i"
20400#define PRIo8 "o"
20401#define PRIo16 "o"
20402#define PRIo32 "o"
20403#define PRIo64 __PRI64_PREFIX "o"
20404#define PRIoLEAST8 "o"
20405#define PRIoLEAST16 "o"
20406#define PRIoLEAST32 "o"
20407#define PRIoLEAST64 __PRI64_PREFIX "o"
20408#define PRIoFAST8 "o"
20409#define PRIoFAST16 __PRIPTR_PREFIX "o"
20410#define PRIoFAST32 __PRIPTR_PREFIX "o"
20411#define PRIoFAST64 __PRI64_PREFIX "o"
20412#define PRIu8 "u"
20413#define PRIu16 "u"
20414#define PRIu32 "u"
20415#define PRIu64 __PRI64_PREFIX "u"
20416#define PRIuLEAST8 "u"
20417#define PRIuLEAST16 "u"
20418#define PRIuLEAST32 "u"
20419#define PRIuLEAST64 __PRI64_PREFIX "u"
20420#define PRIuFAST8 "u"
20421#define PRIuFAST16 __PRIPTR_PREFIX "u"
20422#define PRIuFAST32 __PRIPTR_PREFIX "u"
20423#define PRIuFAST64 __PRI64_PREFIX "u"
20424#define PRIx8 "x"
20425#define PRIx16 "x"
20426#define PRIx32 "x"
20427#define PRIx64 __PRI64_PREFIX "x"
20428#define PRIxLEAST8 "x"
20429#define PRIxLEAST16 "x"
20430#define PRIxLEAST32 "x"
20431#define PRIxLEAST64 __PRI64_PREFIX "x"
20432#define PRIxFAST8 "x"
20433#define PRIxFAST16 __PRIPTR_PREFIX "x"
20434#define PRIxFAST32 __PRIPTR_PREFIX "x"
20435#define PRIxFAST64 __PRI64_PREFIX "x"
20436#define PRIX8 "X"
20437#define PRIX16 "X"
20438#define PRIX32 "X"
20439#define PRIX64 __PRI64_PREFIX "X"
20440#define PRIXLEAST8 "X"
20441#define PRIXLEAST16 "X"
20442#define PRIXLEAST32 "X"
20443#define PRIXLEAST64 __PRI64_PREFIX "X"
20444#define PRIXFAST8 "X"
20445#define PRIXFAST16 __PRIPTR_PREFIX "X"
20446#define PRIXFAST32 __PRIPTR_PREFIX "X"
20447#define PRIXFAST64 __PRI64_PREFIX "X"
20448#define PRIdMAX __PRI64_PREFIX "d"
20449#define PRIiMAX __PRI64_PREFIX "i"
20450#define PRIoMAX __PRI64_PREFIX "o"
20451#define PRIuMAX __PRI64_PREFIX "u"
20452#define PRIxMAX __PRI64_PREFIX "x"
20453#define PRIXMAX __PRI64_PREFIX "X"
20454#define PRIdPTR __PRIPTR_PREFIX "d"
20455#define PRIiPTR __PRIPTR_PREFIX "i"
20456#define PRIoPTR __PRIPTR_PREFIX "o"
20457#define PRIuPTR __PRIPTR_PREFIX "u"
20458#define PRIxPTR __PRIPTR_PREFIX "x"
20459#define PRIXPTR __PRIPTR_PREFIX "X"
20460#define SCNd8 "hhd"
20461#define SCNd16 "hd"
20462#define SCNd32 "d"
20463#define SCNd64 __PRI64_PREFIX "d"
20464#define SCNdLEAST8 "hhd"
20465#define SCNdLEAST16 "hd"
20466#define SCNdLEAST32 "d"
20467#define SCNdLEAST64 __PRI64_PREFIX "d"
20468#define SCNdFAST8 "hhd"
20469#define SCNdFAST16 __PRIPTR_PREFIX "d"
20470#define SCNdFAST32 __PRIPTR_PREFIX "d"
20471#define SCNdFAST64 __PRI64_PREFIX "d"
20472#define SCNi8 "hhi"
20473#define SCNi16 "hi"
20474#define SCNi32 "i"
20475#define SCNi64 __PRI64_PREFIX "i"
20476#define SCNiLEAST8 "hhi"
20477#define SCNiLEAST16 "hi"
20478#define SCNiLEAST32 "i"
20479#define SCNiLEAST64 __PRI64_PREFIX "i"
20480#define SCNiFAST8 "hhi"
20481#define SCNiFAST16 __PRIPTR_PREFIX "i"
20482#define SCNiFAST32 __PRIPTR_PREFIX "i"
20483#define SCNiFAST64 __PRI64_PREFIX "i"
20484#define SCNu8 "hhu"
20485#define SCNu16 "hu"
20486#define SCNu32 "u"
20487#define SCNu64 __PRI64_PREFIX "u"
20488#define SCNuLEAST8 "hhu"
20489#define SCNuLEAST16 "hu"
20490#define SCNuLEAST32 "u"
20491#define SCNuLEAST64 __PRI64_PREFIX "u"
20492#define SCNuFAST8 "hhu"
20493#define SCNuFAST16 __PRIPTR_PREFIX "u"
20494#define SCNuFAST32 __PRIPTR_PREFIX "u"
20495#define SCNuFAST64 __PRI64_PREFIX "u"
20496#define SCNo8 "hho"
20497#define SCNo16 "ho"
20498#define SCNo32 "o"
20499#define SCNo64 __PRI64_PREFIX "o"
20500#define SCNoLEAST8 "hho"
20501#define SCNoLEAST16 "ho"
20502#define SCNoLEAST32 "o"
20503#define SCNoLEAST64 __PRI64_PREFIX "o"
20504#define SCNoFAST8 "hho"
20505#define SCNoFAST16 __PRIPTR_PREFIX "o"
20506#define SCNoFAST32 __PRIPTR_PREFIX "o"
20507#define SCNoFAST64 __PRI64_PREFIX "o"
20508#define SCNx8 "hhx"
20509#define SCNx16 "hx"
20510#define SCNx32 "x"
20511#define SCNx64 __PRI64_PREFIX "x"
20512#define SCNxLEAST8 "hhx"
20513#define SCNxLEAST16 "hx"
20514#define SCNxLEAST32 "x"
20515#define SCNxLEAST64 __PRI64_PREFIX "x"
20516#define SCNxFAST8 "hhx"
20517#define SCNxFAST16 __PRIPTR_PREFIX "x"
20518#define SCNxFAST32 __PRIPTR_PREFIX "x"
20519#define SCNxFAST64 __PRI64_PREFIX "x"
20520#define SCNdMAX __PRI64_PREFIX "d"
20521#define SCNiMAX __PRI64_PREFIX "i"
20522#define SCNoMAX __PRI64_PREFIX "o"
20523#define SCNuMAX __PRI64_PREFIX "u"
20524#define SCNxMAX __PRI64_PREFIX "x"
20525#define SCNdPTR __PRIPTR_PREFIX "d"
20526#define SCNiPTR __PRIPTR_PREFIX "i"
20527#define SCNoPTR __PRIPTR_PREFIX "o"
20528#define SCNuPTR __PRIPTR_PREFIX "u"
20529#define SCNxPTR __PRIPTR_PREFIX "x"
20530#define _STDALIGN_H
20531#define alignas _Alignas
20532#define alignof _Alignof
20533#define __alignas_is_defined 1
20534#define __alignof_is_defined 1
20535#define _UNISTD_H 1
20536#define _POSIX_VERSION 200809L
20537#define __POSIX2_THIS_VERSION 200809L
20538#define _POSIX2_VERSION __POSIX2_THIS_VERSION
20539#define _POSIX2_C_VERSION __POSIX2_THIS_VERSION
20540#define _POSIX2_C_BIND __POSIX2_THIS_VERSION
20541#define _POSIX2_C_DEV __POSIX2_THIS_VERSION
20542#define _POSIX2_SW_DEV __POSIX2_THIS_VERSION
20543#define _POSIX2_LOCALEDEF __POSIX2_THIS_VERSION
20544#define _XOPEN_VERSION 700
20545#define _XOPEN_XCU_VERSION 4
20546#define _XOPEN_XPG2 1
20547#define _XOPEN_XPG3 1
20548#define _XOPEN_XPG4 1
20549#define _XOPEN_UNIX 1
20550#define _XOPEN_ENH_I18N 1
20551#define _XOPEN_LEGACY 1
20552#define _BITS_POSIX_OPT_H 1
20553#define _POSIX_JOB_CONTROL 1
20554#define _POSIX_SAVED_IDS 1
20555#define _POSIX_PRIORITY_SCHEDULING 200809L
20556#define _POSIX_SYNCHRONIZED_IO 200809L
20557#define _POSIX_FSYNC 200809L
20558#define _POSIX_MAPPED_FILES 200809L
20559#define _POSIX_MEMLOCK 200809L
20560#define _POSIX_MEMLOCK_RANGE 200809L
20561#define _POSIX_MEMORY_PROTECTION 200809L
20562#define _POSIX_CHOWN_RESTRICTED 0
20563#define _POSIX_VDISABLE '\0'
20564#define _POSIX_NO_TRUNC 1
20565#define _XOPEN_REALTIME 1
20566#define _XOPEN_REALTIME_THREADS 1
20567#define _XOPEN_SHM 1
20568#define _POSIX_THREADS 200809L
20569#define _POSIX_REENTRANT_FUNCTIONS 1
20570#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L
20571#define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L
20572#define _POSIX_THREAD_ATTR_STACKSIZE 200809L
20573#define _POSIX_THREAD_ATTR_STACKADDR 200809L
20574#define _POSIX_THREAD_PRIO_INHERIT 200809L
20575#define _POSIX_THREAD_PRIO_PROTECT 200809L
20576#define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L
20577#define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1
20578#define _POSIX_SEMAPHORES 200809L
20579#define _POSIX_REALTIME_SIGNALS 200809L
20580#define _POSIX_ASYNCHRONOUS_IO 200809L
20581#define _POSIX_ASYNC_IO 1
20582#define _LFS_ASYNCHRONOUS_IO 1
20583#define _POSIX_PRIORITIZED_IO 200809L
20584#define _LFS64_ASYNCHRONOUS_IO 1
20585#define _LFS_LARGEFILE 1
20586#define _LFS64_LARGEFILE 1
20587#define _LFS64_STDIO 1
20588#define _POSIX_SHARED_MEMORY_OBJECTS 200809L
20589#define _POSIX_CPUTIME 0
20590#define _POSIX_THREAD_CPUTIME 0
20591#define _POSIX_REGEXP 1
20592#define _POSIX_READER_WRITER_LOCKS 200809L
20593#define _POSIX_SHELL 1
20594#define _POSIX_TIMEOUTS 200809L
20595#define _POSIX_SPIN_LOCKS 200809L
20596#define _POSIX_SPAWN 200809L
20597#define _POSIX_TIMERS 200809L
20598#define _POSIX_BARRIERS 200809L
20599#define _POSIX_MESSAGE_PASSING 200809L
20600#define _POSIX_THREAD_PROCESS_SHARED 200809L
20601#define _POSIX_MONOTONIC_CLOCK 0
20602#define _POSIX_CLOCK_SELECTION 200809L
20603#define _POSIX_ADVISORY_INFO 200809L
20604#define _POSIX_IPV6 200809L
20605#define _POSIX_RAW_SOCKETS 200809L
20606#define _POSIX2_CHAR_TERM 200809L
20607#define _POSIX_SPORADIC_SERVER -1
20608#define _POSIX_THREAD_SPORADIC_SERVER -1
20609#define _POSIX_TRACE -1
20610#define _POSIX_TRACE_EVENT_FILTER -1
20611#define _POSIX_TRACE_INHERIT -1
20612#define _POSIX_TRACE_LOG -1
20613#define _POSIX_TYPED_MEMORY_OBJECTS -1
20614#define __WORDSIZE 64
20615#define __WORDSIZE_TIME64_COMPAT32 1
20616#define __SYSCALL_WORDSIZE 64
20617#define _POSIX_V7_LPBIG_OFFBIG -1
20618#define _POSIX_V6_LPBIG_OFFBIG -1
20619#define _XBS5_LPBIG_OFFBIG -1
20620#define _POSIX_V7_LP64_OFF64 1
20621#define _POSIX_V6_LP64_OFF64 1
20622#define _XBS5_LP64_OFF64 1
20623#define __ILP32_OFF32_CFLAGS "-m32"
20624#define __ILP32_OFF32_LDFLAGS "-m32"
20625#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
20626#define __ILP32_OFFBIG_LDFLAGS "-m32"
20627#define __LP64_OFF64_CFLAGS "-m64"
20628#define __LP64_OFF64_LDFLAGS "-m64"
20629#define STDIN_FILENO 0
20630#define STDOUT_FILENO 1
20631#define STDERR_FILENO 2
20632#define __need_size_t
20633#define __need_NULL
20634#undef __need_ptrdiff_t
20635#undef __need_size_t
20636#undef __need_wchar_t
20637#undef NULL
20638#define NULL ((void *)0)
20639#undef __need_NULL
20640#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
20641#define __socklen_t_defined
20642#define R_OK 4
20643#define W_OK 2
20644#define X_OK 1
20645#define F_OK 0
20646#define L_SET SEEK_SET
20647#define L_INCR SEEK_CUR
20648#define L_XTND SEEK_END
20649#define _PC_LINK_MAX _PC_LINK_MAX
20650#define _PC_MAX_CANON _PC_MAX_CANON
20651#define _PC_MAX_INPUT _PC_MAX_INPUT
20652#define _PC_NAME_MAX _PC_NAME_MAX
20653#define _PC_PATH_MAX _PC_PATH_MAX
20654#define _PC_PIPE_BUF _PC_PIPE_BUF
20655#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED
20656#define _PC_NO_TRUNC _PC_NO_TRUNC
20657#define _PC_VDISABLE _PC_VDISABLE
20658#define _PC_SYNC_IO _PC_SYNC_IO
20659#define _PC_ASYNC_IO _PC_ASYNC_IO
20660#define _PC_PRIO_IO _PC_PRIO_IO
20661#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF
20662#define _PC_FILESIZEBITS _PC_FILESIZEBITS
20663#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE
20664#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE
20665#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE
20666#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN
20667#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN
20668#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX
20669#define _PC_2_SYMLINKS _PC_2_SYMLINKS
20670#define _SC_ARG_MAX _SC_ARG_MAX
20671#define _SC_CHILD_MAX _SC_CHILD_MAX
20672#define _SC_CLK_TCK _SC_CLK_TCK
20673#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX
20674#define _SC_OPEN_MAX _SC_OPEN_MAX
20675#define _SC_STREAM_MAX _SC_STREAM_MAX
20676#define _SC_TZNAME_MAX _SC_TZNAME_MAX
20677#define _SC_JOB_CONTROL _SC_JOB_CONTROL
20678#define _SC_SAVED_IDS _SC_SAVED_IDS
20679#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS
20680#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING
20681#define _SC_TIMERS _SC_TIMERS
20682#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO
20683#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO
20684#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO
20685#define _SC_FSYNC _SC_FSYNC
20686#define _SC_MAPPED_FILES _SC_MAPPED_FILES
20687#define _SC_MEMLOCK _SC_MEMLOCK
20688#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE
20689#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION
20690#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING
20691#define _SC_SEMAPHORES _SC_SEMAPHORES
20692#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS
20693#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX
20694#define _SC_AIO_MAX _SC_AIO_MAX
20695#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX
20696#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX
20697#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX
20698#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX
20699#define _SC_VERSION _SC_VERSION
20700#define _SC_PAGESIZE _SC_PAGESIZE
20701#define _SC_PAGE_SIZE _SC_PAGESIZE
20702#define _SC_RTSIG_MAX _SC_RTSIG_MAX
20703#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX
20704#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX
20705#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX
20706#define _SC_TIMER_MAX _SC_TIMER_MAX
20707#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX
20708#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX
20709#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX
20710#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX
20711#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX
20712#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX
20713#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX
20714#define _SC_LINE_MAX _SC_LINE_MAX
20715#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX
20716#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX
20717#define _SC_2_VERSION _SC_2_VERSION
20718#define _SC_2_C_BIND _SC_2_C_BIND
20719#define _SC_2_C_DEV _SC_2_C_DEV
20720#define _SC_2_FORT_DEV _SC_2_FORT_DEV
20721#define _SC_2_FORT_RUN _SC_2_FORT_RUN
20722#define _SC_2_SW_DEV _SC_2_SW_DEV
20723#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF
20724#define _SC_PII _SC_PII
20725#define _SC_PII_XTI _SC_PII_XTI
20726#define _SC_PII_SOCKET _SC_PII_SOCKET
20727#define _SC_PII_INTERNET _SC_PII_INTERNET
20728#define _SC_PII_OSI _SC_PII_OSI
20729#define _SC_POLL _SC_POLL
20730#define _SC_SELECT _SC_SELECT
20731#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV
20732#define _SC_IOV_MAX _SC_IOV_MAX
20733#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM
20734#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM
20735#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS
20736#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS
20737#define _SC_PII_OSI_M _SC_PII_OSI_M
20738#define _SC_T_IOV_MAX _SC_T_IOV_MAX
20739#define _SC_THREADS _SC_THREADS
20740#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS
20741#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX
20742#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX
20743#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX
20744#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX
20745#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS
20746#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX
20747#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN
20748#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX
20749#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR
20750#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE
20751#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING
20752#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT
20753#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT
20754#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED
20755#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF
20756#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN
20757#define _SC_PHYS_PAGES _SC_PHYS_PAGES
20758#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES
20759#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX
20760#define _SC_PASS_MAX _SC_PASS_MAX
20761#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION
20762#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION
20763#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX
20764#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT
20765#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N
20766#define _SC_XOPEN_SHM _SC_XOPEN_SHM
20767#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM
20768#define _SC_2_C_VERSION _SC_2_C_VERSION
20769#define _SC_2_UPE _SC_2_UPE
20770#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2
20771#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3
20772#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4
20773#define _SC_CHAR_BIT _SC_CHAR_BIT
20774#define _SC_CHAR_MAX _SC_CHAR_MAX
20775#define _SC_CHAR_MIN _SC_CHAR_MIN
20776#define _SC_INT_MAX _SC_INT_MAX
20777#define _SC_INT_MIN _SC_INT_MIN
20778#define _SC_LONG_BIT _SC_LONG_BIT
20779#define _SC_WORD_BIT _SC_WORD_BIT
20780#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX
20781#define _SC_NZERO _SC_NZERO
20782#define _SC_SSIZE_MAX _SC_SSIZE_MAX
20783#define _SC_SCHAR_MAX _SC_SCHAR_MAX
20784#define _SC_SCHAR_MIN _SC_SCHAR_MIN
20785#define _SC_SHRT_MAX _SC_SHRT_MAX
20786#define _SC_SHRT_MIN _SC_SHRT_MIN
20787#define _SC_UCHAR_MAX _SC_UCHAR_MAX
20788#define _SC_UINT_MAX _SC_UINT_MAX
20789#define _SC_ULONG_MAX _SC_ULONG_MAX
20790#define _SC_USHRT_MAX _SC_USHRT_MAX
20791#define _SC_NL_ARGMAX _SC_NL_ARGMAX
20792#define _SC_NL_LANGMAX _SC_NL_LANGMAX
20793#define _SC_NL_MSGMAX _SC_NL_MSGMAX
20794#define _SC_NL_NMAX _SC_NL_NMAX
20795#define _SC_NL_SETMAX _SC_NL_SETMAX
20796#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX
20797#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32
20798#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG
20799#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64
20800#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG
20801#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY
20802#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME
20803#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS
20804#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO
20805#define _SC_BARRIERS _SC_BARRIERS
20806#define _SC_BASE _SC_BASE
20807#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT
20808#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R
20809#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION
20810#define _SC_CPUTIME _SC_CPUTIME
20811#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME
20812#define _SC_DEVICE_IO _SC_DEVICE_IO
20813#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC
20814#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R
20815#define _SC_FD_MGMT _SC_FD_MGMT
20816#define _SC_FIFO _SC_FIFO
20817#define _SC_PIPE _SC_PIPE
20818#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES
20819#define _SC_FILE_LOCKING _SC_FILE_LOCKING
20820#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM
20821#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK
20822#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS
20823#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS
20824#define _SC_NETWORKING _SC_NETWORKING
20825#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS
20826#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS
20827#define _SC_REGEXP _SC_REGEXP
20828#define _SC_REGEX_VERSION _SC_REGEX_VERSION
20829#define _SC_SHELL _SC_SHELL
20830#define _SC_SIGNALS _SC_SIGNALS
20831#define _SC_SPAWN _SC_SPAWN
20832#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER
20833#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER
20834#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE
20835#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R
20836#define _SC_TIMEOUTS _SC_TIMEOUTS
20837#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS
20838#define _SC_USER_GROUPS _SC_USER_GROUPS
20839#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R
20840#define _SC_2_PBS _SC_2_PBS
20841#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING
20842#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE
20843#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE
20844#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK
20845#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX
20846#define _SC_STREAMS _SC_STREAMS
20847#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT
20848#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32
20849#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG
20850#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64
20851#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG
20852#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX
20853#define _SC_TRACE _SC_TRACE
20854#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER
20855#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT
20856#define _SC_TRACE_LOG _SC_TRACE_LOG
20857#define _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_SIZE
20858#define _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_ASSOC
20859#define _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_ICACHE_LINESIZE
20860#define _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_SIZE
20861#define _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_ASSOC
20862#define _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL1_DCACHE_LINESIZE
20863#define _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_SIZE
20864#define _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_ASSOC
20865#define _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL2_CACHE_LINESIZE
20866#define _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_SIZE
20867#define _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_ASSOC
20868#define _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL3_CACHE_LINESIZE
20869#define _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_SIZE
20870#define _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_ASSOC
20871#define _SC_LEVEL4_CACHE_LINESIZE _SC_LEVEL4_CACHE_LINESIZE
20872#define _SC_IPV6 _SC_IPV6
20873#define _SC_RAW_SOCKETS _SC_RAW_SOCKETS
20874#define _SC_V7_ILP32_OFF32 _SC_V7_ILP32_OFF32
20875#define _SC_V7_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG
20876#define _SC_V7_LP64_OFF64 _SC_V7_LP64_OFF64
20877#define _SC_V7_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG
20878#define _SC_SS_REPL_MAX _SC_SS_REPL_MAX
20879#define _SC_TRACE_EVENT_NAME_MAX _SC_TRACE_EVENT_NAME_MAX
20880#define _SC_TRACE_NAME_MAX _SC_TRACE_NAME_MAX
20881#define _SC_TRACE_SYS_MAX _SC_TRACE_SYS_MAX
20882#define _SC_TRACE_USER_EVENT_MAX _SC_TRACE_USER_EVENT_MAX
20883#define _SC_XOPEN_STREAMS _SC_XOPEN_STREAMS
20884#define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT
20885#define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT
20886#define _CS_PATH _CS_PATH
20887#define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
20888#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
20889#define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION
20890#define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION
20891#define _CS_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS
20892#define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS
20893#define _CS_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS
20894#define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS
20895#define _CS_LFS_CFLAGS _CS_LFS_CFLAGS
20896#define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS
20897#define _CS_LFS_LIBS _CS_LFS_LIBS
20898#define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS
20899#define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS
20900#define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS
20901#define _CS_LFS64_LIBS _CS_LFS64_LIBS
20902#define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS
20903#define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS
20904#define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS
20905#define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS
20906#define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS
20907#define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS
20908#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS
20909#define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS
20910#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
20911#define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS
20912#define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS
20913#define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS
20914#define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS
20915#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS
20916#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
20917#define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS
20918#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
20919#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS
20920#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
20921#define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS
20922#define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
20923#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
20924#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
20925#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS
20926#define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
20927#define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS
20928#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS
20929#define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS
20930#define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS
20931#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
20932#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
20933#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
20934#define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
20935#define _CS_POSIX_V7_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS
20936#define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
20937#define _CS_POSIX_V7_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS
20938#define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS
20939#define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
20940#define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
20941#define _CS_POSIX_V7_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS
20942#define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS
20943#define _CS_POSIX_V7_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS
20944#define _CS_POSIX_V7_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS
20945#define _CS_POSIX_V7_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS
20946#define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS _CS_POSIX_V7_LP64_OFF64_LINTFLAGS
20947#define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
20948#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
20949#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
20950#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
20951#define _CS_V6_ENV _CS_V6_ENV
20952#define _CS_V7_ENV _CS_V7_ENV
20953#define _GETOPT_POSIX_H 1
20954#define _GETOPT_CORE_H 1
20955#define F_ULOCK 0
20956#define F_LOCK 1
20957#define F_TLOCK 2
20958#define F_TEST 3
20959#define TEMP_FAILURE_RETRY(expression) (__extension__ ({ long int __result; do __result = (long int) (expression); while (__result == -1L && errno == EINTR); __result; }))
20960#define RBIMPL_DLLEXPORT_H
20961#undef RUBY_EXTERN
20962#define RUBY_EXTERN extern
20963#define MJIT_FUNC_EXPORTED RUBY_FUNC_EXPORTED
20964#define MJIT_SYMBOL_EXPORT_BEGIN RUBY_SYMBOL_EXPORT_BEGIN
20965#define MJIT_SYMBOL_EXPORT_END RUBY_SYMBOL_EXPORT_END
20966#define MJIT_STATIC static
20967#define RBIMPL_SYMBOL_EXPORT_BEGIN() RUBY_SYMBOL_EXPORT_BEGIN
20968#define RBIMPL_SYMBOL_EXPORT_END() RUBY_SYMBOL_EXPORT_END
20969#define RBIMPL_XMALLOC_H
20970#define RBIMPL_ATTR_ALLOC_SIZE_H
20971#define RBIMPL_HAS_ATTRIBUTE_H
20972#define RBIMPL_TOKEN_PASTE_H
20973#define RBIMPL_HAS_WARNING_H
20974#define RBIMPL_HAS_WARNING(_) 0
20975#define RBIMPL_WARNING_PUSH_H
20976#define RBIMPL_WARNING_PRAGMA0(x) _Pragma(#x)
20977#define RBIMPL_WARNING_PRAGMA1(x) RBIMPL_WARNING_PRAGMA0(GCC diagnostic x)
20978#define RBIMPL_WARNING_PRAGMA2(x,y) RBIMPL_WARNING_PRAGMA1(x #y)
20979#define RBIMPL_WARNING_PUSH() RBIMPL_WARNING_PRAGMA1(push)
20980#define RBIMPL_WARNING_POP() RBIMPL_WARNING_PRAGMA1(pop)
20981#define RBIMPL_WARNING_ERROR(flag) RBIMPL_WARNING_PRAGMA2(error, flag)
20982#define RBIMPL_WARNING_IGNORED(flag) RBIMPL_WARNING_PRAGMA2(ignored, flag)
20983#define RBIMPL_TOKEN_PASTE(x,y) TOKEN_PASTE(x, y)
20984#pragma GCC diagnostic ignored "-Wundef"
20985#define RBIMPL_HAVE___HAS_ATTRIBUTE 1
20986#define RBIMPL_HAS_ATTRIBUTE(_) __has_attribute(_)
20987#define RBIMPL_ATTR_ALLOC_SIZE(tuple) __attribute__((__alloc_size__ tuple))
20988#define RBIMPL_ATTR_NODISCARD_H
20989#define RBIMPL_HAS_C_ATTRIBUTE_H
20990#define RBIMPL_HAS_C_ATTRIBUTE(_) __has_c_attribute(_)
20991#define RBIMPL_HAS_CPP_ATTRIBUTE_H
20992#define RBIMPL_HAS_CPP_ATTRIBUTE0(_) __has_cpp_attribute(_)
20993#define RBIMPL_HAS_CPP_ATTRIBUTE(_) 0
20994#define RBIMPL_ATTR_NODISCARD() [[nodiscard]]
20995#define RBIMPL_ATTR_NOEXCEPT_H
20996#define RBIMPL_HAS_FEATURE_H
20997#define RBIMPL_HAS_FEATURE(_) 0
20998#define RBIMPL_ATTR_NOEXCEPT(_)
20999#define RBIMPL_ATTR_RESTRICT_H
21000#define RBIMPL_ATTR_RESTRICT() __attribute__((__malloc__))
21001#define RBIMPL_ATTR_RETURNS_NONNULL_H
21002#define RBIMPL_ATTR_RETURNS_NONNULL() __attribute__((__returns_nonnull__))
21003#define USE_GC_MALLOC_OBJ_INFO_DETAILS 0
21004#define xmalloc ruby_xmalloc
21005#define xmalloc2 ruby_xmalloc2
21006#define xcalloc ruby_xcalloc
21007#define xrealloc ruby_xrealloc
21008#define xrealloc2 ruby_xrealloc2
21009#define xfree ruby_xfree
21010#pragma GCC visibility push(default)
21011#pragma GCC visibility pop
21012#define RUBY_BACKWARD2_ASSUME_H
21013#define RBIMPL_ASSUME_H
21014#define RBIMPL_CAST_H
21015#define RBIMPL_CAST(expr) (expr)
21016#define RBIMPL_HAS_BUILTIN_H
21017#define RBIMPL_HAVE___HAS_BUILTIN 1
21018#define RBIMPL_HAS_BUILTIN(_) __has_builtin(_)
21019#define RBIMPL_UNREACHABLE_RETURN(_) __builtin_unreachable()
21020#define RBIMPL_UNREACHABLE __builtin_unreachable
21021#define RBIMPL_ASSUME(_) (RB_LIKELY(!!(_)) ? RBIMPL_CAST((void)0) : RBIMPL_UNREACHABLE())
21022#undef ASSUME
21023#undef UNREACHABLE
21024#define ASSUME RBIMPL_ASSUME
21025#define UNREACHABLE RBIMPL_UNREACHABLE()
21026#define UNREACHABLE_RETURN RBIMPL_UNREACHABLE_RETURN
21027#define RB_LIKELY(x) (__builtin_expect(!!(x), 1))
21028#define RB_UNLIKELY(x) (__builtin_expect(!!(x), 0))
21029#define RUBY_BACKWARD2_ATTRIBUTES_H
21030#define RBIMPL_ATTR_CONST_H
21031#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_H
21032#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_DECLSPEC_ATTRIBUTE_, _)
21033#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_align RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
21034#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_deprecated RBIMPL_COMPILER_SINCE(MSVC,13, 0, 0)
21035#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_dllexport RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
21036#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_dllimport RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
21037#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_empty_bases RBIMPL_COMPILER_SINCE(MSVC,19, 0, 23918)
21038#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noalias RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
21039#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noinline RBIMPL_COMPILER_SINCE(MSVC,13, 0, 0)
21040#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noreturn RBIMPL_COMPILER_SINCE(MSVC,11, 0, 0)
21041#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_nothrow RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
21042#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_restrict RBIMPL_COMPILER_SINCE(MSVC,14, 0, 0)
21043#undef RBIMPL_HAS_DECLSPEC_ATTRIBUTE_nothrow
21044#define RBIMPL_ATTR_CONST() __attribute__((__const__))
21045#define RBIMPL_ATTR_CONST_UNLESS_DEBUG() RBIMPL_ATTR_CONST()
21046#define RBIMPL_ATTR_DEPRECATED_H
21047#define RBIMPL_HAS_EXTENSION_H
21048#define RBIMPL_HAS_EXTENSION(_) RBIMPL_HAS_FEATURE(_)
21049#define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
21050#define RBIMPL_ATTR_ERROR_H
21051#define RBIMPL_ATTR_ERROR(msg) __attribute__((__error__ msg))
21052#define RBIMPL_ATTR_FORCEINLINE_H
21053#define RBIMPL_ATTR_FORCEINLINE() __attribute__((__always_inline__)) inline
21054#define RBIMPL_ATTR_FORMAT_H
21055#define RBIMPL_ATTR_FORMAT(x,y,z) __attribute__((__format__(x, y, z)))
21056#define RBIMPL_PRINTF_FORMAT __printf__
21057#define RBIMPL_ATTR_MAYBE_UNUSED_H
21058#define RBIMPL_ATTR_MAYBE_UNUSED() [[maybe_unused]]
21059#define RBIMPL_ATTR_NOINLINE_H
21060#define RBIMPL_ATTR_NOINLINE() __attribute__((__noinline__))
21061#define RBIMPL_ATTR_NONNULL_H
21062#define RBIMPL_ATTR_NONNULL(list) __attribute__((__nonnull__ list))
21063#define RBIMPL_ATTR_NORETURN_H
21064#define RBIMPL_ATTR_NORETURN() __attribute__((__noreturn__))
21065#define RBIMPL_ATTR_PURE_H
21066#define RUBY_ASSERT_H
21067#define RBIMPL_RUBY_DEBUG 0
21068#define RBIMPL_NDEBUG 0
21069#undef RUBY_DEBUG
21070#undef RUBY_NDEBUG
21071#undef NDEBUG
21072#define RUBY_DEBUG 0
21073#define RUBY_NDEBUG 1
21074#define NDEBUG
21075#undef RBIMPL_NDEBUG
21076#undef RBIMPL_RUBY_DEBUG
21077#define RBIMPL_ASSERT_NOTHING RBIMPL_CAST((void)0)
21078#pragma GCC visibility push(default)
21079#pragma GCC visibility pop
21080#define RBIMPL_ASSERT_FUNC RUBY_FUNCTION_NAME_STRING
21081#define RUBY_ASSERT_FAIL(mesg) rb_assert_failure(__FILE__, __LINE__, RBIMPL_ASSERT_FUNC, mesg)
21082#define RUBY_ASSERT_MESG(expr,mesg) (RB_LIKELY(expr) ? RBIMPL_ASSERT_NOTHING : RUBY_ASSERT_FAIL(mesg))
21083#define RUBY_ASSERT_ALWAYS(expr) RUBY_ASSERT_MESG((expr), #expr)
21084#define RUBY_ASSERT(expr) RBIMPL_ASSERT_NOTHING
21085#define RUBY_ASSERT_NDEBUG(expr) RBIMPL_ASSERT_NOTHING
21086#define RUBY_ASSERT_MESG_WHEN(cond,expr,mesg) ((cond) ? RUBY_ASSERT_MESG((expr), (mesg)) : RBIMPL_ASSERT_NOTHING)
21087#define RUBY_ASSERT_WHEN(cond,expr) RUBY_ASSERT_MESG_WHEN((cond), (expr), #expr)
21088#define RBIMPL_ASSERT_OR_ASSUME(expr) RBIMPL_ASSERT_NOTHING
21089#define RBIMPL_ATTR_PURE() __attribute__((__pure__))
21090#define RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_PURE()
21091#define RBIMPL_ATTR_WARNING_H
21092#define RBIMPL_ATTR_WARNING(msg) __attribute__((__warning__ msg))
21093#undef CONSTFUNC
21094#define CONSTFUNC(x) RBIMPL_ATTR_CONST() x
21095#undef PUREFUNC
21096#define PUREFUNC(x) RBIMPL_ATTR_PURE() x
21097#undef DEPRECATED
21098#define DEPRECATED(x) RBIMPL_ATTR_DEPRECATED(("")) x
21099#undef DEPRECATED_BY
21100#define DEPRECATED_BY(n,x) RBIMPL_ATTR_DEPRECATED(("by: " #n)) x
21101#undef DEPRECATED_TYPE
21102#define DEPRECATED_TYPE(mesg,decl) _Pragma("message \"DEPRECATED_TYPE is deprecated\""); decl RBIMPL_ATTR_DEPRECATED(mseg)
21103#undef RUBY_CXX_DEPRECATED
21104#define RUBY_CXX_DEPRECATED(mseg) RBIMPL_ATTR_DEPRECATED((mseg))
21105#undef NOINLINE
21106#define NOINLINE(x) RBIMPL_ATTR_NOINLINE() x
21107#undef ERRORFUNC
21108#define ERRORFUNC(mesg,x) RBIMPL_ATTR_ERROR(mesg) x
21109#define HAVE_ATTRIBUTE_ERRORFUNC 1
21110#undef WARNINGFUNC
21111#define WARNINGFUNC(mesg,x) RBIMPL_ATTR_WARNING(mesg) x
21112#define HAVE_ATTRIBUTE_WARNINGFUNC 1
21113#undef COLDFUNC
21114#define PRINTF_ARGS(decl,string_index,first_to_check) RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, (string_index), (first_to_check)) decl
21115#undef RUBY_ATTR_ALLOC_SIZE
21116#define RUBY_ATTR_ALLOC_SIZE RBIMPL_ATTR_ALLOC_SIZE
21117#undef RUBY_ATTR_MALLOC
21118#define RUBY_ATTR_MALLOC RBIMPL_ATTR_RESTRICT()
21119#undef RUBY_ATTR_RETURNS_NONNULL
21120#define RUBY_ATTR_RETURNS_NONNULL RBIMPL_ATTR_RETURNS_NONNULL()
21121#define RUBY_ALIAS_FUNCTION(prot,name,args) RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)
21122#undef RUBY_FUNC_NONNULL
21123#define RUBY_FUNC_NONNULL(n,x) RBIMPL_ATTR_NONNULL(n) x
21124#undef NORETURN
21125#define NORETURN(x) RBIMPL_ATTR_NORETURN() x
21126#define NORETURN_STYLE_NEW
21127#define PACKED_STRUCT_UNALIGNED(x) PACKED_STRUCT(x)
21128#undef RB_UNUSED_VAR
21129#define RB_UNUSED_VAR(x) x RBIMPL_ATTR_MAYBE_UNUSED()
21130#define RUBY_BACKWARD2_BOOL_H
21131#define RBIMPL_STDBOOL_H
21132#define _STDBOOL_H
21133#define bool _Bool
21134#define true 1
21135#define false 0
21136#define __bool_true_false_are_defined 1
21137#define FALSE false
21138#define TRUE true
21139#define RUBY_BACKWARD2_GCC_VERSION_SINCE_H
21140#define GCC_VERSION_SINCE(x,y,z) RBIMPL_COMPILER_SINCE(GCC, (x), (y), (z))
21141#define GCC_VERSION_BEFORE(x,y,z) (RBIMPL_COMPILER_BEFORE(GCC, (x), (y), (z)) || (RBIMPL_COMPILER_IS(GCC) && ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && (RBIMPL_COMPILER_VERSION_PATCH == (z))))))
21142#define RUBY_BACKWARD2_LONG_LONG_H
21143#define HAVE_TRUE_LONG_LONG 1
21144#define LONG_LONG long long
21145#define RUBY_BACKWARD2_STDALIGN_H
21146#define RBIMPL_STDALIGN_H
21147#define RBIMPL_ALIGNAS(_) __attribute__((__aligned__(_)))
21148#define RBIMPL_ALIGNOF(T) RB_GNUC_EXTENSION(_Alignof(T))
21149#undef RUBY_ALIGNAS
21150#undef RUBY_ALIGNOF
21151#define RUBY_ALIGNAS RBIMPL_ALIGNAS
21152#define RUBY_ALIGNOF RBIMPL_ALIGNOF
21153#define RUBY_BACKWARD2_STDARG_H
21154#undef _
21155#define _(args) args
21156#undef __
21157#define __(args) args
21158#define ANYARGS
21159#define RBIMPL_DOSISH_H
21160#define PATH_SEP ":"
21161#define PATH_SEP_CHAR PATH_SEP[0]
21162#define PATH_ENV "PATH"
21163#define CASEFOLD_FILESYSTEM 0
21164#define RUBY_MISSING_H 1
21165#define _MATH_H 1
21166#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
21167#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
21168#undef __GLIBC_USE_LIB_EXT2
21169#define __GLIBC_USE_LIB_EXT2 1
21170#undef __GLIBC_USE_IEC_60559_BFP_EXT
21171#define __GLIBC_USE_IEC_60559_BFP_EXT 1
21172#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
21173#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
21174#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
21175#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
21176#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
21177#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
21178#undef __GLIBC_USE_IEC_60559_TYPES_EXT
21179#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
21180#define _BITS_LIBM_SIMD_DECL_STUBS_H 1
21181#define __DECL_SIMD_cos
21182#define __DECL_SIMD_cosf
21183#define __DECL_SIMD_cosl
21184#define __DECL_SIMD_cosf16
21185#define __DECL_SIMD_cosf32
21186#define __DECL_SIMD_cosf64
21187#define __DECL_SIMD_cosf128
21188#define __DECL_SIMD_cosf32x
21189#define __DECL_SIMD_cosf64x
21190#define __DECL_SIMD_cosf128x
21191#define __DECL_SIMD_sin
21192#define __DECL_SIMD_sinf
21193#define __DECL_SIMD_sinl
21194#define __DECL_SIMD_sinf16
21195#define __DECL_SIMD_sinf32
21196#define __DECL_SIMD_sinf64
21197#define __DECL_SIMD_sinf128
21198#define __DECL_SIMD_sinf32x
21199#define __DECL_SIMD_sinf64x
21200#define __DECL_SIMD_sinf128x
21201#define __DECL_SIMD_sincos
21202#define __DECL_SIMD_sincosf
21203#define __DECL_SIMD_sincosl
21204#define __DECL_SIMD_sincosf16
21205#define __DECL_SIMD_sincosf32
21206#define __DECL_SIMD_sincosf64
21207#define __DECL_SIMD_sincosf128
21208#define __DECL_SIMD_sincosf32x
21209#define __DECL_SIMD_sincosf64x
21210#define __DECL_SIMD_sincosf128x
21211#define __DECL_SIMD_log
21212#define __DECL_SIMD_logf
21213#define __DECL_SIMD_logl
21214#define __DECL_SIMD_logf16
21215#define __DECL_SIMD_logf32
21216#define __DECL_SIMD_logf64
21217#define __DECL_SIMD_logf128
21218#define __DECL_SIMD_logf32x
21219#define __DECL_SIMD_logf64x
21220#define __DECL_SIMD_logf128x
21221#define __DECL_SIMD_exp
21222#define __DECL_SIMD_expf
21223#define __DECL_SIMD_expl
21224#define __DECL_SIMD_expf16
21225#define __DECL_SIMD_expf32
21226#define __DECL_SIMD_expf64
21227#define __DECL_SIMD_expf128
21228#define __DECL_SIMD_expf32x
21229#define __DECL_SIMD_expf64x
21230#define __DECL_SIMD_expf128x
21231#define __DECL_SIMD_pow
21232#define __DECL_SIMD_powf
21233#define __DECL_SIMD_powl
21234#define __DECL_SIMD_powf16
21235#define __DECL_SIMD_powf32
21236#define __DECL_SIMD_powf64
21237#define __DECL_SIMD_powf128
21238#define __DECL_SIMD_powf32x
21239#define __DECL_SIMD_powf64x
21240#define __DECL_SIMD_powf128x
21241#define HUGE_VAL (__builtin_huge_val ())
21242#define HUGE_VALF (__builtin_huge_valf ())
21243#define HUGE_VALL (__builtin_huge_vall ())
21244#define HUGE_VAL_F32 (__builtin_huge_valf32 ())
21245#define HUGE_VAL_F64 (__builtin_huge_valf64 ())
21246#define HUGE_VAL_F128 (__builtin_huge_valf128 ())
21247#define HUGE_VAL_F32X (__builtin_huge_valf32x ())
21248#define HUGE_VAL_F64X (__builtin_huge_valf64x ())
21249#define INFINITY (__builtin_inff ())
21250#define NAN (__builtin_nanf (""))
21251#define SNANF (__builtin_nansf (""))
21252#define SNAN (__builtin_nans (""))
21253#define SNANL (__builtin_nansl (""))
21254#define SNANF32 (__builtin_nansf32 (""))
21255#define SNANF64 (__builtin_nansf64 (""))
21256#define SNANF128 (__builtin_nansf128 (""))
21257#define SNANF32X (__builtin_nansf32x (""))
21258#define SNANF64X (__builtin_nansf64x (""))
21259#define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__
21260#define __FP_LOGB0_IS_MIN 1
21261#define __FP_LOGBNAN_IS_MIN 1
21262#define FP_ILOGB0 (-2147483647 - 1)
21263#define FP_ILOGBNAN (-2147483647 - 1)
21264#define __FP_LONG_MAX 0x7fffffffffffffffL
21265#define FP_LLOGB0 (-__FP_LONG_MAX - 1)
21266#define FP_LLOGBNAN (-__FP_LONG_MAX - 1)
21267#define FP_INT_UPWARD 0
21268#define FP_INT_DOWNWARD 1
21269#define FP_INT_TOWARDZERO 2
21270#define FP_INT_TONEARESTFROMZERO 3
21271#define FP_INT_TONEAREST 4
21272#define __SIMD_DECL(function) __CONCAT (__DECL_SIMD_, function)
21273#define __MATHCALL_VEC(function,suffix,args) __SIMD_DECL (__MATH_PRECNAME (function, suffix)) __MATHCALL (function, suffix, args)
21274#define __MATHDECL_VEC(type,function,suffix,args) __SIMD_DECL (__MATH_PRECNAME (function, suffix)) __MATHDECL(type, function,suffix, args)
21275#define __MATHCALL(function,suffix,args) __MATHDECL (_Mdouble_,function,suffix, args)
21276#define __MATHDECL(type,function,suffix,args) __MATHDECL_1(type, function,suffix, args); __MATHDECL_1(type, __CONCAT(__,function),suffix, args)
21277#define __MATHCALLX(function,suffix,args,attrib) __MATHDECLX (_Mdouble_,function,suffix, args, attrib)
21278#define __MATHDECLX(type,function,suffix,args,attrib) __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib)
21279#define __MATHDECL_1_IMPL(type,function,suffix,args) extern type __MATH_PRECNAME(function,suffix) args __THROW
21280#define __MATHDECL_1(type,function,suffix,args) __MATHDECL_1_IMPL(type, function, suffix, args)
21281#define __MATHDECL_ALIAS(type,function,suffix,args,alias) __MATHDECL_1(type, function, suffix, args)
21282#define __MATHREDIR(type,function,suffix,args,to) extern type __REDIRECT_NTH (__MATH_PRECNAME (function, suffix), args, to)
21283#define _Mdouble_ double
21284#define __MATH_PRECNAME(name,r) __CONCAT(name,r)
21285#define __MATH_DECLARING_DOUBLE 1
21286#define __MATH_DECLARING_FLOATN 0
21287#undef _Mdouble_
21288#undef __MATH_PRECNAME
21289#undef __MATH_DECLARING_DOUBLE
21290#undef __MATH_DECLARING_FLOATN
21291#define _Mdouble_ float
21292#define __MATH_PRECNAME(name,r) name ##f ##r
21293#define __MATH_DECLARING_DOUBLE 0
21294#define __MATH_DECLARING_FLOATN 0
21295#undef _Mdouble_
21296#undef __MATH_PRECNAME
21297#undef __MATH_DECLARING_DOUBLE
21298#undef __MATH_DECLARING_FLOATN
21299#define _Mdouble_ long double
21300#define __MATH_PRECNAME(name,r) name ##l ##r
21301#define __MATH_DECLARING_DOUBLE 0
21302#define __MATH_DECLARING_FLOATN 0
21303#define __MATH_DECLARE_LDOUBLE 1
21304#undef _Mdouble_
21305#undef __MATH_PRECNAME
21306#undef __MATH_DECLARING_DOUBLE
21307#undef __MATH_DECLARING_FLOATN
21308#define _Mdouble_ _Float32
21309#define __MATH_PRECNAME(name,r) name ##f32 ##r
21310#define __MATH_DECLARING_DOUBLE 0
21311#define __MATH_DECLARING_FLOATN 1
21312#undef _Mdouble_
21313#undef __MATH_PRECNAME
21314#undef __MATH_DECLARING_DOUBLE
21315#undef __MATH_DECLARING_FLOATN
21316#define _Mdouble_ _Float64
21317#define __MATH_PRECNAME(name,r) name ##f64 ##r
21318#define __MATH_DECLARING_DOUBLE 0
21319#define __MATH_DECLARING_FLOATN 1
21320#undef _Mdouble_
21321#undef __MATH_PRECNAME
21322#undef __MATH_DECLARING_DOUBLE
21323#undef __MATH_DECLARING_FLOATN
21324#define _Mdouble_ _Float128
21325#define __MATH_PRECNAME(name,r) name ##f128 ##r
21326#define __MATH_DECLARING_DOUBLE 0
21327#define __MATH_DECLARING_FLOATN 1
21328#undef _Mdouble_
21329#undef __MATH_PRECNAME
21330#undef __MATH_DECLARING_DOUBLE
21331#undef __MATH_DECLARING_FLOATN
21332#define _Mdouble_ _Float32x
21333#define __MATH_PRECNAME(name,r) name ##f32x ##r
21334#define __MATH_DECLARING_DOUBLE 0
21335#define __MATH_DECLARING_FLOATN 1
21336#undef _Mdouble_
21337#undef __MATH_PRECNAME
21338#undef __MATH_DECLARING_DOUBLE
21339#undef __MATH_DECLARING_FLOATN
21340#define _Mdouble_ _Float64x
21341#define __MATH_PRECNAME(name,r) name ##f64x ##r
21342#define __MATH_DECLARING_DOUBLE 0
21343#define __MATH_DECLARING_FLOATN 1
21344#undef _Mdouble_
21345#undef __MATH_PRECNAME
21346#undef __MATH_DECLARING_DOUBLE
21347#undef __MATH_DECLARING_FLOATN
21348#undef __MATHDECL_1_IMPL
21349#undef __MATHDECL_1
21350#undef __MATHDECL_ALIAS
21351#undef __MATHDECL
21352#undef __MATHCALL
21353#define __MATHCALL_NARROW_ARGS_1 (_Marg_ __x)
21354#define __MATHCALL_NARROW_ARGS_2 (_Marg_ __x, _Marg_ __y)
21355#define __MATHCALL_NARROW_ARGS_3 (_Marg_ __x, _Marg_ __y, _Marg_ __z)
21356#define __MATHCALL_NARROW_NORMAL(func,nargs) extern _Mret_ func __MATHCALL_NARROW_ARGS_ ## nargs __THROW
21357#define __MATHCALL_NARROW_REDIR(func,redir,nargs) extern _Mret_ __REDIRECT_NTH (func, __MATHCALL_NARROW_ARGS_ ## nargs, redir)
21358#define __MATHCALL_NARROW(func,redir,nargs) __MATHCALL_NARROW_NORMAL (func, nargs)
21359#define _Mret_ float
21360#define _Marg_ double
21361#define __MATHCALL_NAME(name) f ## name
21362#undef _Mret_
21363#undef _Marg_
21364#undef __MATHCALL_NAME
21365#define _Mret_ float
21366#define _Marg_ long double
21367#define __MATHCALL_NAME(name) f ## name ## l
21368#undef _Mret_
21369#undef _Marg_
21370#undef __MATHCALL_NAME
21371#define _Mret_ double
21372#define _Marg_ long double
21373#define __MATHCALL_NAME(name) d ## name ## l
21374#undef _Mret_
21375#undef _Marg_
21376#undef __MATHCALL_NAME
21377#define _Mret_ _Float32
21378#define _Marg_ _Float32x
21379#define __MATHCALL_NAME(name) f32 ## name ## f32x
21380#undef _Mret_
21381#undef _Marg_
21382#undef __MATHCALL_NAME
21383#define _Mret_ _Float32
21384#define _Marg_ _Float64
21385#define __MATHCALL_NAME(name) f32 ## name ## f64
21386#undef _Mret_
21387#undef _Marg_
21388#undef __MATHCALL_NAME
21389#define _Mret_ _Float32
21390#define _Marg_ _Float64x
21391#define __MATHCALL_NAME(name) f32 ## name ## f64x
21392#undef _Mret_
21393#undef _Marg_
21394#undef __MATHCALL_NAME
21395#define _Mret_ _Float32
21396#define _Marg_ _Float128
21397#define __MATHCALL_NAME(name) f32 ## name ## f128
21398#undef _Mret_
21399#undef _Marg_
21400#undef __MATHCALL_NAME
21401#define _Mret_ _Float32x
21402#define _Marg_ _Float64
21403#define __MATHCALL_NAME(name) f32x ## name ## f64
21404#undef _Mret_
21405#undef _Marg_
21406#undef __MATHCALL_NAME
21407#define _Mret_ _Float32x
21408#define _Marg_ _Float64x
21409#define __MATHCALL_NAME(name) f32x ## name ## f64x
21410#undef _Mret_
21411#undef _Marg_
21412#undef __MATHCALL_NAME
21413#define _Mret_ _Float32x
21414#define _Marg_ _Float128
21415#define __MATHCALL_NAME(name) f32x ## name ## f128
21416#undef _Mret_
21417#undef _Marg_
21418#undef __MATHCALL_NAME
21419#define _Mret_ _Float64
21420#define _Marg_ _Float64x
21421#define __MATHCALL_NAME(name) f64 ## name ## f64x
21422#undef _Mret_
21423#undef _Marg_
21424#undef __MATHCALL_NAME
21425#define _Mret_ _Float64
21426#define _Marg_ _Float128
21427#define __MATHCALL_NAME(name) f64 ## name ## f128
21428#undef _Mret_
21429#undef _Marg_
21430#undef __MATHCALL_NAME
21431#define _Mret_ _Float64x
21432#define _Marg_ _Float128
21433#define __MATHCALL_NAME(name) f64x ## name ## f128
21434#undef _Mret_
21435#undef _Marg_
21436#undef __MATHCALL_NAME
21437#undef __MATHCALL_NARROW_ARGS_1
21438#undef __MATHCALL_NARROW_ARGS_2
21439#undef __MATHCALL_NARROW_ARGS_3
21440#undef __MATHCALL_NARROW_NORMAL
21441#undef __MATHCALL_NARROW_REDIR
21442#undef __MATHCALL_NARROW
21443#define __MATH_TG_F32(FUNC,ARGS) _Float32: FUNC ## f ARGS,
21444#define __MATH_TG_F64X(FUNC,ARGS) _Float64x: FUNC ## l ARGS,
21445#define __MATH_TG(TG_ARG,FUNC,ARGS) _Generic ((TG_ARG), float: FUNC ## f ARGS, __MATH_TG_F32 (FUNC, ARGS) default: FUNC ARGS, long double: FUNC ## l ARGS, __MATH_TG_F64X (FUNC, ARGS) _Float128: FUNC ## f128 ARGS)
21446#define FP_NAN 0
21447#define FP_INFINITE 1
21448#define FP_ZERO 2
21449#define FP_SUBNORMAL 3
21450#define FP_NORMAL 4
21451#define fpclassify(x) __builtin_fpclassify (FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x)
21452#define signbit(x) __builtin_signbit (x)
21453#define isfinite(x) __builtin_isfinite (x)
21454#define isnormal(x) __builtin_isnormal (x)
21455#define isnan(x) __builtin_isnan (x)
21456#define isinf(x) __builtin_isinf_sign (x)
21457#define MATH_ERRNO 1
21458#define MATH_ERREXCEPT 2
21459#define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)
21460#define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1)
21461#define __iscanonical(x) ((void) (__typeof (x)) (x), 1)
21462#define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1)
21463#define iscanonical(x) __MATH_TG ((x), __iscanonical, (x))
21464#define issignaling(x) __MATH_TG ((x), __issignaling, (x))
21465#define issubnormal(x) (fpclassify (x) == FP_SUBNORMAL)
21466#define iszero(x) (((__typeof (x)) (x)) == 0)
21467#define MAXFLOAT 3.40282347e+38F
21468#define M_E 2.7182818284590452354
21469#define M_LOG2E 1.4426950408889634074
21470#define M_LOG10E 0.43429448190325182765
21471#define M_LN2 0.69314718055994530942
21472#define M_LN10 2.30258509299404568402
21473#define M_PI 3.14159265358979323846
21474#define M_PI_2 1.57079632679489661923
21475#define M_PI_4 0.78539816339744830962
21476#define M_1_PI 0.31830988618379067154
21477#define M_2_PI 0.63661977236758134308
21478#define M_2_SQRTPI 1.12837916709551257390
21479#define M_SQRT2 1.41421356237309504880
21480#define M_SQRT1_2 0.70710678118654752440
21481#define M_El 2.718281828459045235360287471352662498L
21482#define M_LOG2El 1.442695040888963407359924681001892137L
21483#define M_LOG10El 0.434294481903251827651128918916605082L
21484#define M_LN2l 0.693147180559945309417232121458176568L
21485#define M_LN10l 2.302585092994045684017991454684364208L
21486#define M_PIl 3.141592653589793238462643383279502884L
21487#define M_PI_2l 1.570796326794896619231321691639751442L
21488#define M_PI_4l 0.785398163397448309615660845819875721L
21489#define M_1_PIl 0.318309886183790671537767526745028724L
21490#define M_2_PIl 0.636619772367581343075535053490057448L
21491#define M_2_SQRTPIl 1.128379167095512573896158903121545172L
21492#define M_SQRT2l 1.414213562373095048801688724209698079L
21493#define M_SQRT1_2l 0.707106781186547524400844362104849039L
21494#define M_Ef32 __f32 (2.718281828459045235360287471352662498)
21495#define M_LOG2Ef32 __f32 (1.442695040888963407359924681001892137)
21496#define M_LOG10Ef32 __f32 (0.434294481903251827651128918916605082)
21497#define M_LN2f32 __f32 (0.693147180559945309417232121458176568)
21498#define M_LN10f32 __f32 (2.302585092994045684017991454684364208)
21499#define M_PIf32 __f32 (3.141592653589793238462643383279502884)
21500#define M_PI_2f32 __f32 (1.570796326794896619231321691639751442)
21501#define M_PI_4f32 __f32 (0.785398163397448309615660845819875721)
21502#define M_1_PIf32 __f32 (0.318309886183790671537767526745028724)
21503#define M_2_PIf32 __f32 (0.636619772367581343075535053490057448)
21504#define M_2_SQRTPIf32 __f32 (1.128379167095512573896158903121545172)
21505#define M_SQRT2f32 __f32 (1.414213562373095048801688724209698079)
21506#define M_SQRT1_2f32 __f32 (0.707106781186547524400844362104849039)
21507#define M_Ef64 __f64 (2.718281828459045235360287471352662498)
21508#define M_LOG2Ef64 __f64 (1.442695040888963407359924681001892137)
21509#define M_LOG10Ef64 __f64 (0.434294481903251827651128918916605082)
21510#define M_LN2f64 __f64 (0.693147180559945309417232121458176568)
21511#define M_LN10f64 __f64 (2.302585092994045684017991454684364208)
21512#define M_PIf64 __f64 (3.141592653589793238462643383279502884)
21513#define M_PI_2f64 __f64 (1.570796326794896619231321691639751442)
21514#define M_PI_4f64 __f64 (0.785398163397448309615660845819875721)
21515#define M_1_PIf64 __f64 (0.318309886183790671537767526745028724)
21516#define M_2_PIf64 __f64 (0.636619772367581343075535053490057448)
21517#define M_2_SQRTPIf64 __f64 (1.128379167095512573896158903121545172)
21518#define M_SQRT2f64 __f64 (1.414213562373095048801688724209698079)
21519#define M_SQRT1_2f64 __f64 (0.707106781186547524400844362104849039)
21520#define M_Ef128 __f128 (2.718281828459045235360287471352662498)
21521#define M_LOG2Ef128 __f128 (1.442695040888963407359924681001892137)
21522#define M_LOG10Ef128 __f128 (0.434294481903251827651128918916605082)
21523#define M_LN2f128 __f128 (0.693147180559945309417232121458176568)
21524#define M_LN10f128 __f128 (2.302585092994045684017991454684364208)
21525#define M_PIf128 __f128 (3.141592653589793238462643383279502884)
21526#define M_PI_2f128 __f128 (1.570796326794896619231321691639751442)
21527#define M_PI_4f128 __f128 (0.785398163397448309615660845819875721)
21528#define M_1_PIf128 __f128 (0.318309886183790671537767526745028724)
21529#define M_2_PIf128 __f128 (0.636619772367581343075535053490057448)
21530#define M_2_SQRTPIf128 __f128 (1.128379167095512573896158903121545172)
21531#define M_SQRT2f128 __f128 (1.414213562373095048801688724209698079)
21532#define M_SQRT1_2f128 __f128 (0.707106781186547524400844362104849039)
21533#define M_Ef32x __f32x (2.718281828459045235360287471352662498)
21534#define M_LOG2Ef32x __f32x (1.442695040888963407359924681001892137)
21535#define M_LOG10Ef32x __f32x (0.434294481903251827651128918916605082)
21536#define M_LN2f32x __f32x (0.693147180559945309417232121458176568)
21537#define M_LN10f32x __f32x (2.302585092994045684017991454684364208)
21538#define M_PIf32x __f32x (3.141592653589793238462643383279502884)
21539#define M_PI_2f32x __f32x (1.570796326794896619231321691639751442)
21540#define M_PI_4f32x __f32x (0.785398163397448309615660845819875721)
21541#define M_1_PIf32x __f32x (0.318309886183790671537767526745028724)
21542#define M_2_PIf32x __f32x (0.636619772367581343075535053490057448)
21543#define M_2_SQRTPIf32x __f32x (1.128379167095512573896158903121545172)
21544#define M_SQRT2f32x __f32x (1.414213562373095048801688724209698079)
21545#define M_SQRT1_2f32x __f32x (0.707106781186547524400844362104849039)
21546#define M_Ef64x __f64x (2.718281828459045235360287471352662498)
21547#define M_LOG2Ef64x __f64x (1.442695040888963407359924681001892137)
21548#define M_LOG10Ef64x __f64x (0.434294481903251827651128918916605082)
21549#define M_LN2f64x __f64x (0.693147180559945309417232121458176568)
21550#define M_LN10f64x __f64x (2.302585092994045684017991454684364208)
21551#define M_PIf64x __f64x (3.141592653589793238462643383279502884)
21552#define M_PI_2f64x __f64x (1.570796326794896619231321691639751442)
21553#define M_PI_4f64x __f64x (0.785398163397448309615660845819875721)
21554#define M_1_PIf64x __f64x (0.318309886183790671537767526745028724)
21555#define M_2_PIf64x __f64x (0.636619772367581343075535053490057448)
21556#define M_2_SQRTPIf64x __f64x (1.128379167095512573896158903121545172)
21557#define M_SQRT2f64x __f64x (1.414213562373095048801688724209698079)
21558#define M_SQRT1_2f64x __f64x (0.707106781186547524400844362104849039)
21559#define isgreater(x,y) __builtin_isgreater(x, y)
21560#define isgreaterequal(x,y) __builtin_isgreaterequal(x, y)
21561#define isless(x,y) __builtin_isless(x, y)
21562#define islessequal(x,y) __builtin_islessequal(x, y)
21563#define islessgreater(x,y) __builtin_islessgreater(x, y)
21564#define isunordered(x,y) __builtin_isunordered(x, y)
21565#define __MATH_EVAL_FMT2(x,y) ((x) + (y) + 0.0f)
21566#define iseqsig(x,y) __MATH_TG (__MATH_EVAL_FMT2 (x, y), __iseqsig, ((x), (y)))
21567#define _TIME_H 1
21568#define __need_size_t
21569#define __need_NULL
21570#undef __need_ptrdiff_t
21571#undef __need_size_t
21572#undef __need_wchar_t
21573#undef NULL
21574#define NULL ((void *)0)
21575#undef __need_NULL
21576#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
21577#define _BITS_TIME_H 1
21578#define CLOCKS_PER_SEC ((__clock_t) 1000000)
21579#define CLOCK_REALTIME 0
21580#define CLOCK_MONOTONIC 1
21581#define CLOCK_PROCESS_CPUTIME_ID 2
21582#define CLOCK_THREAD_CPUTIME_ID 3
21583#define CLOCK_MONOTONIC_RAW 4
21584#define CLOCK_REALTIME_COARSE 5
21585#define CLOCK_MONOTONIC_COARSE 6
21586#define CLOCK_BOOTTIME 7
21587#define CLOCK_REALTIME_ALARM 8
21588#define CLOCK_BOOTTIME_ALARM 9
21589#define CLOCK_TAI 11
21590#define TIMER_ABSTIME 1
21591#define _BITS_TIMEX_H 1
21592#define ADJ_OFFSET 0x0001
21593#define ADJ_FREQUENCY 0x0002
21594#define ADJ_MAXERROR 0x0004
21595#define ADJ_ESTERROR 0x0008
21596#define ADJ_STATUS 0x0010
21597#define ADJ_TIMECONST 0x0020
21598#define ADJ_TAI 0x0080
21599#define ADJ_SETOFFSET 0x0100
21600#define ADJ_MICRO 0x1000
21601#define ADJ_NANO 0x2000
21602#define ADJ_TICK 0x4000
21603#define ADJ_OFFSET_SINGLESHOT 0x8001
21604#define ADJ_OFFSET_SS_READ 0xa001
21605#define MOD_OFFSET ADJ_OFFSET
21606#define MOD_FREQUENCY ADJ_FREQUENCY
21607#define MOD_MAXERROR ADJ_MAXERROR
21608#define MOD_ESTERROR ADJ_ESTERROR
21609#define MOD_STATUS ADJ_STATUS
21610#define MOD_TIMECONST ADJ_TIMECONST
21611#define MOD_CLKB ADJ_TICK
21612#define MOD_CLKA ADJ_OFFSET_SINGLESHOT
21613#define MOD_TAI ADJ_TAI
21614#define MOD_MICRO ADJ_MICRO
21615#define MOD_NANO ADJ_NANO
21616#define STA_PLL 0x0001
21617#define STA_PPSFREQ 0x0002
21618#define STA_PPSTIME 0x0004
21619#define STA_FLL 0x0008
21620#define STA_INS 0x0010
21621#define STA_DEL 0x0020
21622#define STA_UNSYNC 0x0040
21623#define STA_FREQHOLD 0x0080
21624#define STA_PPSSIGNAL 0x0100
21625#define STA_PPSJITTER 0x0200
21626#define STA_PPSWANDER 0x0400
21627#define STA_PPSERROR 0x0800
21628#define STA_CLOCKERR 0x1000
21629#define STA_NANO 0x2000
21630#define STA_MODE 0x4000
21631#define STA_CLK 0x8000
21632#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
21633#define __struct_tm_defined 1
21634#define __itimerspec_defined 1
21635#define TIME_UTC 1
21636#define __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
21637#define _SYS_TIME_H 1
21638#define TIMEVAL_TO_TIMESPEC(tv,ts) { (ts)->tv_sec = (tv)->tv_sec; (ts)->tv_nsec = (tv)->tv_usec * 1000; }
21639#define TIMESPEC_TO_TIMEVAL(tv,ts) { (tv)->tv_sec = (ts)->tv_sec; (tv)->tv_usec = (ts)->tv_nsec / 1000; }
21640#define ITIMER_REAL ITIMER_REAL
21641#define ITIMER_VIRTUAL ITIMER_VIRTUAL
21642#define ITIMER_PROF ITIMER_PROF
21643#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
21644#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
21645#define timercmp(a,b,CMP) (((a)->tv_sec == (b)->tv_sec) ? ((a)->tv_usec CMP (b)->tv_usec) : ((a)->tv_sec CMP (b)->tv_sec))
21646#define timeradd(a,b,result) do { (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; if ((result)->tv_usec >= 1000000) { ++(result)->tv_sec; (result)->tv_usec -= 1000000; } } while (0)
21647#define timersub(a,b,result) do { (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; if ((result)->tv_usec < 0) { --(result)->tv_sec; (result)->tv_usec += 1000000; } } while (0)
21648#pragma GCC visibility push(default)
21649#pragma GCC visibility pop
21650#define RUBY
21651#define RB_GNUC_EXTENSION __extension__
21652#define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; })
21653#define RUBY_MBCHAR_MAXSIZE INT_MAX
21654#define FLUSH_REGISTER_WINDOWS ((void)0)
21655#define RBIMPL_ANYARGS_H
21656#define RBIMPL_ATTR_WEAKREF_H
21657#define RBIMPL_ATTR_WEAKREF(sym) __attribute__((__weakref__(#sym)))
21658#define RBIMPL_INTERN_CLASS_H
21659#define RBIMPL_VALUE_H
21660#define RBIMPL_STATIC_ASSERT_H
21661#define _ASSERT_H 1
21662#define __ASSERT_VOID_CAST (void)
21663#define assert(expr) (__ASSERT_VOID_CAST (0))
21664#define assert_perror(errnum) (__ASSERT_VOID_CAST (0))
21665#undef static_assert
21666#define static_assert _Static_assert
21667#define RBIMPL_STATIC_ASSERT0 __extension__ _Static_assert
21668#define RBIMPL_STATIC_ASSERT(name,expr) RBIMPL_STATIC_ASSERT0(expr, #name ": " #expr)
21669#define RUBY_BACKWARD2_LIMITS_H
21670#define _GCC_LIMITS_H_
21671#define _GCC_NEXT_LIMITS_H
21672#define _LIBC_LIMITS_H_ 1
21673#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
21674#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
21675#undef __GLIBC_USE_LIB_EXT2
21676#define __GLIBC_USE_LIB_EXT2 1
21677#undef __GLIBC_USE_IEC_60559_BFP_EXT
21678#define __GLIBC_USE_IEC_60559_BFP_EXT 1
21679#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
21680#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
21681#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
21682#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
21683#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
21684#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
21685#undef __GLIBC_USE_IEC_60559_TYPES_EXT
21686#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
21687#define MB_LEN_MAX 16
21688#define LLONG_MIN (-LLONG_MAX-1)
21689#define LLONG_MAX __LONG_LONG_MAX__
21690#define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
21691#define CHAR_WIDTH 8
21692#define SCHAR_WIDTH 8
21693#define UCHAR_WIDTH 8
21694#define SHRT_WIDTH 16
21695#define USHRT_WIDTH 16
21696#define INT_WIDTH 32
21697#define UINT_WIDTH 32
21698#define LONG_WIDTH __WORDSIZE
21699#define ULONG_WIDTH __WORDSIZE
21700#define LLONG_WIDTH 64
21701#define ULLONG_WIDTH 64
21702#define BOOL_MAX 1
21703#define BOOL_WIDTH 1
21704#define _BITS_POSIX1_LIM_H 1
21705#define __WORDSIZE 64
21706#define __WORDSIZE_TIME64_COMPAT32 1
21707#define __SYSCALL_WORDSIZE 64
21708#define _POSIX_AIO_LISTIO_MAX 2
21709#define _POSIX_AIO_MAX 1
21710#define _POSIX_ARG_MAX 4096
21711#define _POSIX_CHILD_MAX 25
21712#define _POSIX_DELAYTIMER_MAX 32
21713#define _POSIX_HOST_NAME_MAX 255
21714#define _POSIX_LINK_MAX 8
21715#define _POSIX_LOGIN_NAME_MAX 9
21716#define _POSIX_MAX_CANON 255
21717#define _POSIX_MAX_INPUT 255
21718#define _POSIX_MQ_OPEN_MAX 8
21719#define _POSIX_MQ_PRIO_MAX 32
21720#define _POSIX_NAME_MAX 14
21721#define _POSIX_NGROUPS_MAX 8
21722#define _POSIX_OPEN_MAX 20
21723#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX
21724#define _POSIX_PATH_MAX 256
21725#define _POSIX_PIPE_BUF 512
21726#define _POSIX_RE_DUP_MAX 255
21727#define _POSIX_RTSIG_MAX 8
21728#define _POSIX_SEM_NSEMS_MAX 256
21729#define _POSIX_SEM_VALUE_MAX 32767
21730#define _POSIX_SIGQUEUE_MAX 32
21731#define _POSIX_SSIZE_MAX 32767
21732#define _POSIX_STREAM_MAX 8
21733#define _POSIX_SYMLINK_MAX 255
21734#define _POSIX_SYMLOOP_MAX 8
21735#define _POSIX_TIMER_MAX 32
21736#define _POSIX_TTY_NAME_MAX 9
21737#define _POSIX_TZNAME_MAX 6
21738#define _POSIX_QLIMIT 1
21739#define _POSIX_HIWAT _POSIX_PIPE_BUF
21740#define _POSIX_UIO_MAXIOV 16
21741#define _POSIX_CLOCKRES_MIN 20000000
21742#define __undef_NR_OPEN
21743#define __undef_LINK_MAX
21744#define __undef_OPEN_MAX
21745#define __undef_ARG_MAX
21746#define _LINUX_LIMITS_H
21747#define NR_OPEN 1024
21748#define NGROUPS_MAX 65536
21749#define ARG_MAX 131072
21750#define LINK_MAX 127
21751#define MAX_CANON 255
21752#define MAX_INPUT 255
21753#define NAME_MAX 255
21754#define PATH_MAX 4096
21755#define PIPE_BUF 4096
21756#define XATTR_NAME_MAX 255
21757#define XATTR_SIZE_MAX 65536
21758#define XATTR_LIST_MAX 65536
21759#define RTSIG_MAX 32
21760#undef NR_OPEN
21761#undef __undef_NR_OPEN
21762#undef LINK_MAX
21763#undef __undef_LINK_MAX
21764#undef OPEN_MAX
21765#undef __undef_OPEN_MAX
21766#undef ARG_MAX
21767#undef __undef_ARG_MAX
21768#define _POSIX_THREAD_KEYS_MAX 128
21769#define PTHREAD_KEYS_MAX 1024
21770#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
21771#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
21772#define _POSIX_THREAD_THREADS_MAX 64
21773#undef PTHREAD_THREADS_MAX
21774#define AIO_PRIO_DELTA_MAX 20
21775#define PTHREAD_STACK_MIN 16384
21776#define DELAYTIMER_MAX 2147483647
21777#define TTY_NAME_MAX 32
21778#define LOGIN_NAME_MAX 256
21779#define HOST_NAME_MAX 64
21780#define MQ_PRIO_MAX 32768
21781#define SEM_VALUE_MAX (2147483647)
21782#define SSIZE_MAX LONG_MAX
21783#define _BITS_POSIX2_LIM_H 1
21784#define _POSIX2_BC_BASE_MAX 99
21785#define _POSIX2_BC_DIM_MAX 2048
21786#define _POSIX2_BC_SCALE_MAX 99
21787#define _POSIX2_BC_STRING_MAX 1000
21788#define _POSIX2_COLL_WEIGHTS_MAX 2
21789#define _POSIX2_EXPR_NEST_MAX 32
21790#define _POSIX2_LINE_MAX 2048
21791#define _POSIX2_RE_DUP_MAX 255
21792#define _POSIX2_CHARCLASS_NAME_MAX 14
21793#define BC_BASE_MAX _POSIX2_BC_BASE_MAX
21794#define BC_DIM_MAX _POSIX2_BC_DIM_MAX
21795#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX
21796#define BC_STRING_MAX _POSIX2_BC_STRING_MAX
21797#define COLL_WEIGHTS_MAX 255
21798#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX
21799#define LINE_MAX _POSIX2_LINE_MAX
21800#define CHARCLASS_NAME_MAX 2048
21801#define RE_DUP_MAX (0x7fff)
21802#define _XOPEN_LIM_H 1
21803#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV
21804#define _BITS_UIO_LIM_H 1
21805#define __IOV_MAX 1024
21806#define IOV_MAX __IOV_MAX
21807#define NL_ARGMAX _POSIX_ARG_MAX
21808#define NL_LANGMAX _POSIX2_LINE_MAX
21809#define NL_MSGMAX INT_MAX
21810#define NL_NMAX INT_MAX
21811#define NL_SETMAX INT_MAX
21812#define NL_TEXTMAX INT_MAX
21813#define NZERO 20
21814#define WORD_BIT 32
21815#define LONG_BIT 64
21816#undef _GCC_NEXT_LIMITS_H
21817#define _LIMITS_H___
21818#undef CHAR_BIT
21819#define CHAR_BIT __CHAR_BIT__
21820#undef SCHAR_MIN
21821#define SCHAR_MIN (-SCHAR_MAX - 1)
21822#undef SCHAR_MAX
21823#define SCHAR_MAX __SCHAR_MAX__
21824#undef UCHAR_MAX
21825#define UCHAR_MAX (SCHAR_MAX * 2 + 1)
21826#undef CHAR_MIN
21827#define CHAR_MIN SCHAR_MIN
21828#undef CHAR_MAX
21829#define CHAR_MAX SCHAR_MAX
21830#undef SHRT_MIN
21831#define SHRT_MIN (-SHRT_MAX - 1)
21832#undef SHRT_MAX
21833#define SHRT_MAX __SHRT_MAX__
21834#undef USHRT_MAX
21835#define USHRT_MAX (SHRT_MAX * 2 + 1)
21836#undef INT_MIN
21837#define INT_MIN (-INT_MAX - 1)
21838#undef INT_MAX
21839#define INT_MAX __INT_MAX__
21840#undef UINT_MAX
21841#define UINT_MAX (INT_MAX * 2U + 1U)
21842#undef LONG_MIN
21843#define LONG_MIN (-LONG_MAX - 1L)
21844#undef LONG_MAX
21845#define LONG_MAX __LONG_MAX__
21846#undef ULONG_MAX
21847#define ULONG_MAX (LONG_MAX * 2UL + 1UL)
21848#undef LLONG_MIN
21849#define LLONG_MIN (-LLONG_MAX - 1LL)
21850#undef LLONG_MAX
21851#define LLONG_MAX __LONG_LONG_MAX__
21852#undef ULLONG_MAX
21853#define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
21854#undef LONG_LONG_MIN
21855#define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)
21856#undef LONG_LONG_MAX
21857#define LONG_LONG_MAX __LONG_LONG_MAX__
21858#undef ULONG_LONG_MAX
21859#define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL)
21860#undef CHAR_WIDTH
21861#define CHAR_WIDTH __SCHAR_WIDTH__
21862#undef SCHAR_WIDTH
21863#define SCHAR_WIDTH __SCHAR_WIDTH__
21864#undef UCHAR_WIDTH
21865#define UCHAR_WIDTH __SCHAR_WIDTH__
21866#undef SHRT_WIDTH
21867#define SHRT_WIDTH __SHRT_WIDTH__
21868#undef USHRT_WIDTH
21869#define USHRT_WIDTH __SHRT_WIDTH__
21870#undef INT_WIDTH
21871#define INT_WIDTH __INT_WIDTH__
21872#undef UINT_WIDTH
21873#define UINT_WIDTH __INT_WIDTH__
21874#undef LONG_WIDTH
21875#define LONG_WIDTH __LONG_WIDTH__
21876#undef ULONG_WIDTH
21877#define ULONG_WIDTH __LONG_WIDTH__
21878#undef LLONG_WIDTH
21879#define LLONG_WIDTH __LONG_LONG_WIDTH__
21880#undef ULLONG_WIDTH
21881#define ULLONG_WIDTH __LONG_LONG_WIDTH__
21882#define SIGNED_VALUE long
21883#define SIZEOF_VALUE SIZEOF_LONG
21884#define PRI_VALUE_PREFIX "l"
21885#define RBIMPL_VALUE_NULL 0UL
21886#define RBIMPL_VALUE_ONE 1UL
21887#define RBIMPL_VALUE_FULL ULONG_MAX
21888#pragma GCC visibility push(default)
21889#pragma GCC visibility pop
21890#define RBIMPL_INTERN_VM_H
21891#pragma GCC visibility push(default)
21892#define HAVE_RB_DEFINE_ALLOC_FUNC 1
21893#pragma GCC visibility pop
21894#define RBIMPL_METHOD_H
21895#pragma GCC visibility push(default)
21896#pragma GCC visibility pop
21897#define RBIMPL_CFUNC_IS_rb_f_notimplement(f) __builtin_types_compatible_p( __typeof__(f), __typeof__(rb_f_notimplement))
21898#define RBIMPL_ANYARGS_DISPATCH(expr,truthy,falsy) __builtin_choose_expr( __builtin_choose_expr( __builtin_constant_p(expr), (expr), 0), (truthy), (falsy))
21899#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_singleton_method_m2, rb_define_singleton_method_m3)
21900#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_singleton_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n))
21901#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_singleton_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n))
21902#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_singleton_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_00(n))
21903#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_singleton_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_01(n))
21904#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_singleton_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_02(n))
21905#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_singleton_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_03(n))
21906#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_singleton_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_04(n))
21907#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_singleton_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_05(n))
21908#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_singleton_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_06(n))
21909#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_singleton_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_07(n))
21910#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_singleton_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_08(n))
21911#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_singleton_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_09(n))
21912#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_singleton_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_10(n))
21913#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_singleton_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_11(n))
21914#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_singleton_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_12(n))
21915#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_singleton_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_13(n))
21916#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_singleton_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_14(n))
21917#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_protected_method_m2, rb_define_protected_method_m3)
21918#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_protected_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m2(n))
21919#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_protected_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m1(n))
21920#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_protected_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_00(n))
21921#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_protected_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_01(n))
21922#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_protected_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_02(n))
21923#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_protected_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_03(n))
21924#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_protected_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_04(n))
21925#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_protected_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_05(n))
21926#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_protected_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_06(n))
21927#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_protected_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_07(n))
21928#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_protected_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_08(n))
21929#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_protected_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_09(n))
21930#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_protected_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_10(n))
21931#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_protected_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_11(n))
21932#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_protected_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_12(n))
21933#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_protected_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_13(n))
21934#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_protected_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_14(n))
21935#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_private_method_m2, rb_define_private_method_m3)
21936#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_private_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m2(n))
21937#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_private_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m1(n))
21938#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_private_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_00(n))
21939#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_private_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_01(n))
21940#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_private_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_02(n))
21941#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_private_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_03(n))
21942#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_private_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_04(n))
21943#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_private_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_05(n))
21944#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_private_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_06(n))
21945#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_private_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_07(n))
21946#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_private_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_08(n))
21947#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_private_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_09(n))
21948#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_private_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_10(n))
21949#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_private_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_11(n))
21950#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_private_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_12(n))
21951#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_private_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_13(n))
21952#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_private_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_14(n))
21953#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_module_function_m2, rb_define_module_function_m3)
21954#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_module_function_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m2(n))
21955#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_module_function_00, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m1(n))
21956#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_module_function_01, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_00(n))
21957#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_module_function_02, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_01(n))
21958#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_module_function_03, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_02(n))
21959#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_module_function_04, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_03(n))
21960#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_module_function_05, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_04(n))
21961#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_module_function_06, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_05(n))
21962#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_module_function_07, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_06(n))
21963#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_module_function_08, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_07(n))
21964#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_module_function_09, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_08(n))
21965#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_module_function_10, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_09(n))
21966#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_module_function_11, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_10(n))
21967#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_module_function_12, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_11(n))
21968#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_module_function_13, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_12(n))
21969#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_module_function_14, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_13(n))
21970#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_module_function_15, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_14(n))
21971#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_global_function_m2, rb_define_global_function_m3)
21972#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_global_function_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m2(n))
21973#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_global_function_00, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m1(n))
21974#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_global_function_01, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_00(n))
21975#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_global_function_02, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_01(n))
21976#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_global_function_03, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_02(n))
21977#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_global_function_04, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_03(n))
21978#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_global_function_05, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_04(n))
21979#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_global_function_06, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_05(n))
21980#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_global_function_07, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_06(n))
21981#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_global_function_08, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_07(n))
21982#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_global_function_09, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_08(n))
21983#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_global_function_10, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_09(n))
21984#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_global_function_11, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_10(n))
21985#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_global_function_12, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_11(n))
21986#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_global_function_13, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_12(n))
21987#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_global_function_14, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_13(n))
21988#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_global_function_15, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_14(n))
21989#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_method_id_m2, rb_define_method_id_m3)
21990#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_method_id_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m2(n))
21991#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_method_id_00, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m1(n))
21992#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_method_id_01, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_00(n))
21993#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_method_id_02, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_01(n))
21994#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_method_id_03, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_02(n))
21995#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_method_id_04, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_03(n))
21996#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_method_id_05, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_04(n))
21997#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_method_id_06, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_05(n))
21998#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_method_id_07, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_06(n))
21999#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_method_id_08, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_07(n))
22000#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_method_id_09, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_08(n))
22001#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_method_id_10, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_09(n))
22002#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_method_id_11, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_10(n))
22003#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_method_id_12, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_11(n))
22004#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_method_id_13, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_12(n))
22005#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_method_id_14, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_13(n))
22006#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_method_id_15, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_14(n))
22007#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_method_m2, rb_define_method_m3)
22008#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_method_m2(n))
22009#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_method_m1(n))
22010#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_method_00(n))
22011#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_method_01(n))
22012#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_method_02(n))
22013#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_method_03(n))
22014#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_method_04(n))
22015#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_method_05(n))
22016#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_method_06(n))
22017#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_method_07(n))
22018#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_method_08(n))
22019#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_method_09(n))
22020#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_method_10(n))
22021#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_method_11(n))
22022#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_method_12(n))
22023#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_method_13(n))
22024#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_method_14(n))
22025#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_singleton_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_15(n))
22026#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_protected_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_15(n))
22027#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_private_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_15(n))
22028#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_module_function_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_15(n))
22029#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_global_function_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_15(n))
22030#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_method_id_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_15(n))
22031#define RBIMPL_ANYARGS_DISPATCH_rb_define_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_method_15(n))
22032#define RBIMPL_ANYARGS_ATTRSET(sym) RBIMPL_ATTR_MAYBE_UNUSED() RBIMPL_ATTR_NONNULL() RBIMPL_ATTR_WEAKREF(sym)
22033#define RBIMPL_ANYARGS_DECL(sym,...) RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m2(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m1(__VA_ARGS__, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _00(__VA_ARGS__, VALUE(*)(VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _02(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _03(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _04(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _05(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _06(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _07(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _08(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _09(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _10(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _11(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _12(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _13(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _14(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _15(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
22034#define rb_define_method(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity))
22035#define rb_define_method_id(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method_id((arity), (func))((klass), (mid), (func), (arity))
22036#define rb_define_singleton_method(obj,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method((arity), (func))((obj), (mid), (func), (arity))
22037#define rb_define_protected_method(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method((arity), (func))((klass), (mid), (func), (arity))
22038#define rb_define_private_method(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_private_method((arity), (func))((klass), (mid), (func), (arity))
22039#define rb_define_module_function(mod,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
22040#define rb_define_global_function(mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_global_function((arity), (func))((mid), (func), (arity))
22041#define RUBY_METHOD_FUNC(func) RBIMPL_CAST((VALUE (*)(ANYARGS))(func))
22042#define RBIMPL_ARITHMETIC_H
22043#define RBIMPL_ARITHMETIC_CHAR_H
22044#define RBIMPL_ARITHMETIC_INT_H
22045#define RBIMPL_ARITHMETIC_FIXNUM_H
22046#define FIXABLE RB_FIXABLE
22047#define FIXNUM_MAX RUBY_FIXNUM_MAX
22048#define FIXNUM_MIN RUBY_FIXNUM_MIN
22049#define NEGFIXABLE RB_NEGFIXABLE
22050#define POSFIXABLE RB_POSFIXABLE
22051#define RB_POSFIXABLE(_) ((_) < RUBY_FIXNUM_MAX + 1)
22052#define RB_NEGFIXABLE(_) ((_) >= RUBY_FIXNUM_MIN)
22053#define RB_FIXABLE(_) (RB_POSFIXABLE(_) && RB_NEGFIXABLE(_))
22054#define RUBY_FIXNUM_MAX (LONG_MAX / 2)
22055#define RUBY_FIXNUM_MIN (LONG_MIN / 2)
22056#define RBIMPL_ARITHMETIC_INTPTR_T_H
22057#define rb_int_new rb_int2inum
22058#define rb_uint_new rb_uint2inum
22059#pragma GCC visibility push(default)
22060#pragma GCC visibility pop
22061#define RBIMPL_ARITHMETIC_LONG_H
22062#define RBIMPL_ATTR_ARTIFICIAL_H
22063#define RBIMPL_ATTR_ARTIFICIAL() __attribute__((__artificial__))
22064#define RBIMPL_ATTR_CONSTEXPR_H
22065#define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 0
22066#define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0
22067#define RBIMPL_ATTR_CONSTEXPR(_)
22068#define RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(_) RBIMPL_ATTR_CONSTEXPR(_)
22069#define RBIMPL_SPECIAL_CONSTS_H
22070#define RBIMPL_ATTR_ENUM_EXTENSIBILITY_H
22071#define RBIMPL_ATTR_ENUM_EXTENSIBILITY(_)
22072#define USE_FLONUM 1
22073#define RTEST RB_TEST
22074#define FIXNUM_P RB_FIXNUM_P
22075#define IMMEDIATE_P RB_IMMEDIATE_P
22076#define NIL_P RB_NIL_P
22077#define SPECIAL_CONST_P RB_SPECIAL_CONST_P
22078#define STATIC_SYM_P RB_STATIC_SYM_P
22079#define Qfalse RUBY_Qfalse
22080#define Qnil RUBY_Qnil
22081#define Qtrue RUBY_Qtrue
22082#define Qundef RUBY_Qundef
22083#define FIXNUM_FLAG RUBY_FIXNUM_FLAG
22084#define FLONUM_FLAG RUBY_FLONUM_FLAG
22085#define FLONUM_MASK RUBY_FLONUM_MASK
22086#define FLONUM_P RB_FLONUM_P
22087#define IMMEDIATE_MASK RUBY_IMMEDIATE_MASK
22088#define SYMBOL_FLAG RUBY_SYMBOL_FLAG
22089#define RB_FIXNUM_P RB_FIXNUM_P
22090#define RB_FLONUM_P RB_FLONUM_P
22091#define RB_IMMEDIATE_P RB_IMMEDIATE_P
22092#define RB_NIL_P RB_NIL_P
22093#define RB_SPECIAL_CONST_P RB_SPECIAL_CONST_P
22094#define RB_STATIC_SYM_P RB_STATIC_SYM_P
22095#define RB_TEST RB_TEST
22096#define RUBY_Qfalse RBIMPL_CAST((VALUE)RUBY_Qfalse)
22097#define RUBY_Qtrue RBIMPL_CAST((VALUE)RUBY_Qtrue)
22098#define RUBY_Qnil RBIMPL_CAST((VALUE)RUBY_Qnil)
22099#define RUBY_Qundef RBIMPL_CAST((VALUE)RUBY_Qundef)
22100#define FIX2LONG RB_FIX2LONG
22101#define FIX2ULONG RB_FIX2ULONG
22102#define INT2FIX RB_INT2FIX
22103#define LONG2FIX RB_INT2FIX
22104#define LONG2NUM RB_LONG2NUM
22105#define NUM2LONG RB_NUM2LONG
22106#define NUM2ULONG RB_NUM2ULONG
22107#define RB_FIX2LONG rb_fix2long
22108#define RB_FIX2ULONG rb_fix2ulong
22109#define RB_LONG2FIX RB_INT2FIX
22110#define RB_LONG2NUM rb_long2num_inline
22111#define RB_NUM2LONG rb_num2long_inline
22112#define RB_NUM2ULONG rb_num2ulong_inline
22113#define RB_ULONG2NUM rb_ulong2num_inline
22114#define ULONG2NUM RB_ULONG2NUM
22115#define rb_fix_new RB_INT2FIX
22116#define rb_long2int rb_long2int_inline
22117#define RB_INT2FIX RB_INT2FIX
22118#pragma GCC visibility push(default)
22119#pragma GCC visibility pop
22120#undef INT2FIX
22121#define INT2FIX(i) __builtin_choose_expr( __builtin_constant_p(i), RBIMPL_CAST((VALUE)(i)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(i))
22122#define RB_INT2NUM rb_int2num_inline
22123#define RB_NUM2INT rb_num2int_inline
22124#define RB_UINT2NUM rb_uint2num_inline
22125#define FIX2INT RB_FIX2INT
22126#define FIX2UINT RB_FIX2UINT
22127#define INT2NUM RB_INT2NUM
22128#define NUM2INT RB_NUM2INT
22129#define NUM2UINT RB_NUM2UINT
22130#define UINT2NUM RB_UINT2NUM
22131#define RB_FIX2INT RB_FIX2INT
22132#define RB_NUM2UINT RB_NUM2UINT
22133#define RB_FIX2UINT RB_FIX2UINT
22134#pragma GCC visibility push(default)
22135#pragma GCC visibility pop
22136#pragma GCC diagnostic push
22137#pragma GCC diagnostic ignored "-Wtype-limits"
22138#pragma GCC diagnostic pop
22139#define RBIMPL_RSTRING_H
22140#define RBIMPL_RBASIC_H
22141#define RBIMPL_ATTR_NOALIAS_H
22142#define RBIMPL_ATTR_NOALIAS()
22143#define RBASIC(obj) RBIMPL_CAST((struct RBasic *)(obj))
22144#define RBASIC_CLASS RBASIC_CLASS
22145#define RVALUE_EMBED_LEN_MAX RVALUE_EMBED_LEN_MAX
22146#define RBIMPL_EMBED_LEN_MAX_OF(T) RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / (sizeof(T))))
22147#pragma GCC visibility push(default)
22148#pragma GCC visibility pop
22149#define RBIMPL_FL_TYPE_H
22150#define RBIMPL_ATTR_FLAG_ENUM_H
22151#define RBIMPL_ATTR_FLAG_ENUM()
22152#define RBIMPL_VALUE_TYPE_H
22153#define RBIMPL_CONSTANT_P_H
22154#define RBIMPL_CONSTANT_P(expr) __builtin_constant_p(expr)
22155#define T_ARRAY RUBY_T_ARRAY
22156#define T_BIGNUM RUBY_T_BIGNUM
22157#define T_CLASS RUBY_T_CLASS
22158#define T_COMPLEX RUBY_T_COMPLEX
22159#define T_DATA RUBY_T_DATA
22160#define T_FALSE RUBY_T_FALSE
22161#define T_FILE RUBY_T_FILE
22162#define T_FIXNUM RUBY_T_FIXNUM
22163#define T_FLOAT RUBY_T_FLOAT
22164#define T_HASH RUBY_T_HASH
22165#define T_ICLASS RUBY_T_ICLASS
22166#define T_IMEMO RUBY_T_IMEMO
22167#define T_MASK RUBY_T_MASK
22168#define T_MATCH RUBY_T_MATCH
22169#define T_MODULE RUBY_T_MODULE
22170#define T_MOVED RUBY_T_MOVED
22171#define T_NIL RUBY_T_NIL
22172#define T_NODE RUBY_T_NODE
22173#define T_NONE RUBY_T_NONE
22174#define T_OBJECT RUBY_T_OBJECT
22175#define T_RATIONAL RUBY_T_RATIONAL
22176#define T_REGEXP RUBY_T_REGEXP
22177#define T_STRING RUBY_T_STRING
22178#define T_STRUCT RUBY_T_STRUCT
22179#define T_SYMBOL RUBY_T_SYMBOL
22180#define T_TRUE RUBY_T_TRUE
22181#define T_UNDEF RUBY_T_UNDEF
22182#define T_ZOMBIE RUBY_T_ZOMBIE
22183#define BUILTIN_TYPE RB_BUILTIN_TYPE
22184#define DYNAMIC_SYM_P RB_DYNAMIC_SYM_P
22185#define RB_INTEGER_TYPE_P rb_integer_type_p
22186#define SYMBOL_P RB_SYMBOL_P
22187#define rb_type_p RB_TYPE_P
22188#define RB_BUILTIN_TYPE RB_BUILTIN_TYPE
22189#define RB_DYNAMIC_SYM_P RB_DYNAMIC_SYM_P
22190#define RB_FLOAT_TYPE_P RB_FLOAT_TYPE_P
22191#define RB_SYMBOL_P RB_SYMBOL_P
22192#define RB_TYPE_P RB_TYPE_P
22193#define Check_Type Check_Type
22194#define RBIMPL_ASSERT_TYPE(v,t) RBIMPL_ASSERT_OR_ASSUME(RB_TYPE_P((v), (t)))
22195#define TYPE(_) RBIMPL_CAST((int)rb_type(_))
22196#pragma GCC visibility push(default)
22197#pragma GCC visibility pop
22198#define RBIMPL_WIDER_ENUM 1
22199#define FL_SINGLETON RBIMPL_CAST((VALUE)RUBY_FL_SINGLETON)
22200#define FL_WB_PROTECTED RBIMPL_CAST((VALUE)RUBY_FL_WB_PROTECTED)
22201#define FL_PROMOTED0 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED0)
22202#define FL_PROMOTED1 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED1)
22203#define FL_FINALIZE RBIMPL_CAST((VALUE)RUBY_FL_FINALIZE)
22204#define FL_TAINT RBIMPL_CAST((VALUE)RUBY_FL_TAINT)
22205#define FL_SHAREABLE RBIMPL_CAST((VALUE)RUBY_FL_SHAREABLE)
22206#define FL_UNTRUSTED RBIMPL_CAST((VALUE)RUBY_FL_UNTRUSTED)
22207#define FL_SEEN_OBJ_ID RBIMPL_CAST((VALUE)RUBY_FL_SEEN_OBJ_ID)
22208#define FL_EXIVAR RBIMPL_CAST((VALUE)RUBY_FL_EXIVAR)
22209#define FL_FREEZE RBIMPL_CAST((VALUE)RUBY_FL_FREEZE)
22210#define FL_USHIFT RBIMPL_CAST((VALUE)RUBY_FL_USHIFT)
22211#define FL_USER0 RBIMPL_CAST((VALUE)RUBY_FL_USER0)
22212#define FL_USER1 RBIMPL_CAST((VALUE)RUBY_FL_USER1)
22213#define FL_USER2 RBIMPL_CAST((VALUE)RUBY_FL_USER2)
22214#define FL_USER3 RBIMPL_CAST((VALUE)RUBY_FL_USER3)
22215#define FL_USER4 RBIMPL_CAST((VALUE)RUBY_FL_USER4)
22216#define FL_USER5 RBIMPL_CAST((VALUE)RUBY_FL_USER5)
22217#define FL_USER6 RBIMPL_CAST((VALUE)RUBY_FL_USER6)
22218#define FL_USER7 RBIMPL_CAST((VALUE)RUBY_FL_USER7)
22219#define FL_USER8 RBIMPL_CAST((VALUE)RUBY_FL_USER8)
22220#define FL_USER9 RBIMPL_CAST((VALUE)RUBY_FL_USER9)
22221#define FL_USER10 RBIMPL_CAST((VALUE)RUBY_FL_USER10)
22222#define FL_USER11 RBIMPL_CAST((VALUE)RUBY_FL_USER11)
22223#define FL_USER12 RBIMPL_CAST((VALUE)RUBY_FL_USER12)
22224#define FL_USER13 RBIMPL_CAST((VALUE)RUBY_FL_USER13)
22225#define FL_USER14 RBIMPL_CAST((VALUE)RUBY_FL_USER14)
22226#define FL_USER15 RBIMPL_CAST((VALUE)RUBY_FL_USER15)
22227#define FL_USER16 RBIMPL_CAST((VALUE)RUBY_FL_USER16)
22228#define FL_USER17 RBIMPL_CAST((VALUE)RUBY_FL_USER17)
22229#define FL_USER18 RBIMPL_CAST((VALUE)RUBY_FL_USER18)
22230#define FL_USER19 RBIMPL_CAST((VALUE)(unsigned int)RUBY_FL_USER19)
22231#define ELTS_SHARED RUBY_ELTS_SHARED
22232#define RUBY_ELTS_SHARED RUBY_ELTS_SHARED
22233#define RB_OBJ_FREEZE rb_obj_freeze_inline
22234#define RB_FL_ABLE RB_FL_ABLE
22235#define RB_FL_ALL RB_FL_ALL
22236#define RB_FL_ALL_RAW RB_FL_ALL_RAW
22237#define RB_FL_ANY RB_FL_ANY
22238#define RB_FL_ANY_RAW RB_FL_ANY_RAW
22239#define RB_FL_REVERSE RB_FL_REVERSE
22240#define RB_FL_REVERSE_RAW RB_FL_REVERSE_RAW
22241#define RB_FL_SET RB_FL_SET
22242#define RB_FL_SET_RAW RB_FL_SET_RAW
22243#define RB_FL_TEST RB_FL_TEST
22244#define RB_FL_TEST_RAW RB_FL_TEST_RAW
22245#define RB_FL_UNSET RB_FL_UNSET
22246#define RB_FL_UNSET_RAW RB_FL_UNSET_RAW
22247#define RB_OBJ_FREEZE_RAW RB_OBJ_FREEZE_RAW
22248#define RB_OBJ_FROZEN RB_OBJ_FROZEN
22249#define RB_OBJ_FROZEN_RAW RB_OBJ_FROZEN_RAW
22250#define RB_OBJ_INFECT RB_OBJ_INFECT
22251#define RB_OBJ_INFECT_RAW RB_OBJ_INFECT_RAW
22252#define RB_OBJ_TAINT RB_OBJ_TAINT
22253#define RB_OBJ_TAINTABLE RB_OBJ_TAINTABLE
22254#define RB_OBJ_TAINTED RB_OBJ_TAINTED
22255#define RB_OBJ_TAINTED_RAW RB_OBJ_TAINTED_RAW
22256#define RB_OBJ_TAINT_RAW RB_OBJ_TAINT_RAW
22257#define RB_OBJ_UNTRUST RB_OBJ_UNTRUST
22258#define RB_OBJ_UNTRUSTED RB_OBJ_UNTRUSTED
22259#define FL_ABLE RB_FL_ABLE
22260#define FL_ALL RB_FL_ALL
22261#define FL_ALL_RAW RB_FL_ALL_RAW
22262#define FL_ANY RB_FL_ANY
22263#define FL_ANY_RAW RB_FL_ANY_RAW
22264#define FL_REVERSE RB_FL_REVERSE
22265#define FL_REVERSE_RAW RB_FL_REVERSE_RAW
22266#define FL_SET RB_FL_SET
22267#define FL_SET_RAW RB_FL_SET_RAW
22268#define FL_TEST RB_FL_TEST
22269#define FL_TEST_RAW RB_FL_TEST_RAW
22270#define FL_UNSET RB_FL_UNSET
22271#define FL_UNSET_RAW RB_FL_UNSET_RAW
22272#define OBJ_FREEZE RB_OBJ_FREEZE
22273#define OBJ_FREEZE_RAW RB_OBJ_FREEZE_RAW
22274#define OBJ_FROZEN RB_OBJ_FROZEN
22275#define OBJ_FROZEN_RAW RB_OBJ_FROZEN_RAW
22276#define OBJ_INFECT RB_OBJ_INFECT
22277#define OBJ_INFECT_RAW RB_OBJ_INFECT_RAW
22278#define OBJ_TAINT RB_OBJ_TAINT
22279#define OBJ_TAINTABLE RB_OBJ_TAINTABLE
22280#define OBJ_TAINTED RB_OBJ_TAINTED
22281#define OBJ_TAINTED_RAW RB_OBJ_TAINTED_RAW
22282#define OBJ_TAINT_RAW RB_OBJ_TAINT_RAW
22283#define OBJ_UNTRUST RB_OBJ_UNTRUST
22284#define OBJ_UNTRUSTED RB_OBJ_UNTRUSTED
22285#define RBIMPL_FL_USER_N(n) RUBY_FL_USER ##n = (1<<(RUBY_FL_USHIFT+n))
22286#undef RBIMPL_FL_USER_N
22287#undef RBIMPL_WIDER_ENUM
22288#pragma GCC visibility push(default)
22289#pragma GCC visibility pop
22290#define RSTRING(obj) RBIMPL_CAST((struct RString *)(obj))
22291#define RSTRING_NOEMBED RSTRING_NOEMBED
22292#define RSTRING_EMBED_LEN_MASK RSTRING_EMBED_LEN_MASK
22293#define RSTRING_EMBED_LEN_SHIFT RSTRING_EMBED_LEN_SHIFT
22294#define RSTRING_EMBED_LEN_MAX RSTRING_EMBED_LEN_MAX
22295#define RSTRING_FSTR RSTRING_FSTR
22296#define RSTRING_EMBED_LEN RSTRING_EMBED_LEN
22297#define RSTRING_LEN RSTRING_LEN
22298#define RSTRING_LENINT RSTRING_LENINT
22299#define RSTRING_PTR RSTRING_PTR
22300#define RSTRING_END RSTRING_END
22301#define StringValue(v) rb_string_value(&(v))
22302#define StringValuePtr(v) rb_string_value_ptr(&(v))
22303#define StringValueCStr(v) rb_string_value_cstr(&(v))
22304#define SafeStringValue(v) StringValue(v)
22305#define ExportStringValue(v) do { StringValue(v); (v) = rb_str_export(v); } while (0)
22306#pragma GCC visibility push(default)
22307#define Check_SafeStr(v) rb_check_safe_str(RBIMPL_CAST((VALUE)(v)))
22308#pragma GCC visibility pop
22309#pragma GCC diagnostic push
22310#pragma GCC diagnostic pop
22311#define RSTRING_GETMEM(str,ptrvar,lenvar) __extension__ ({ struct RString rbimpl_str = rbimpl_rstring_getmem(str); (ptrvar) = rbimpl_str.as.heap.ptr; (lenvar) = rbimpl_str.as.heap.len; })
22312#define RB_NUM2CHR rb_num2char_inline
22313#define NUM2CHR RB_NUM2CHR
22314#define CHR2FIX RB_CHR2FIX
22315#define RB_CHR2FIX RB_CHR2FIX
22316#define RBIMPL_ARITHMETIC_DOUBLE_H
22317#define NUM2DBL rb_num2dbl
22318#define RFLOAT_VALUE rb_float_value
22319#define DBL2NUM rb_float_new
22320#pragma GCC visibility push(default)
22321#pragma GCC visibility pop
22322#define RBIMPL_ARITHMETIC_GID_T_H
22323#define RBIMPL_ARITHMETIC_LONG_LONG_H
22324#define RB_LL2NUM rb_ll2inum
22325#define RB_ULL2NUM rb_ull2inum
22326#define LL2NUM RB_LL2NUM
22327#define ULL2NUM RB_ULL2NUM
22328#define RB_NUM2LL rb_num2ll_inline
22329#define RB_NUM2ULL rb_num2ull
22330#define NUM2LL RB_NUM2LL
22331#define NUM2ULL RB_NUM2ULL
22332#pragma GCC visibility push(default)
22333#pragma GCC visibility pop
22334#define RBIMPL_ARITHMETIC_MODE_T_H
22335#define RBIMPL_ARITHMETIC_OFF_T_H
22336#define RBIMPL_ARITHMETIC_PID_T_H
22337#define RBIMPL_ARITHMETIC_SHORT_H
22338#define RB_NUM2SHORT rb_num2short_inline
22339#define RB_NUM2USHORT rb_num2ushort
22340#define NUM2SHORT RB_NUM2SHORT
22341#define NUM2USHORT RB_NUM2USHORT
22342#define USHORT2NUM RB_INT2FIX
22343#define RB_FIX2SHORT rb_fix2short
22344#define FIX2SHORT RB_FIX2SHORT
22345#pragma GCC visibility push(default)
22346#pragma GCC visibility pop
22347#define RBIMPL_ARITHMETIC_SIZE_T_H
22348#define RB_SIZE2NUM RB_ULL2NUM
22349#define RB_SSIZE2NUM RB_LL2NUM
22350#define RB_NUM2SIZE RB_NUM2ULL
22351#define RB_NUM2SSIZE RB_NUM2LL
22352#define NUM2SIZET RB_NUM2SIZE
22353#define SIZET2NUM RB_SIZE2NUM
22354#define NUM2SSIZET RB_NUM2SSIZE
22355#define SSIZET2NUM RB_SSIZE2NUM
22356#define RBIMPL_ARITHMERIC_ST_DATA_T_H
22357#define RUBY_ST_H 1
22358#pragma GCC visibility push(default)
22359#define ST_DATA_T_DEFINED
22360#define MAX_ST_INDEX_VAL (~(st_index_t) 0)
22361#define SIZEOF_ST_INDEX_T SIZEOF_VOIDP
22362#define ST_INDEX_BITS (SIZEOF_ST_INDEX_T * CHAR_BIT)
22363#define ST_DATA_COMPATIBLE_P(type) __builtin_choose_expr(__builtin_types_compatible_p(type, st_data_t), 1, 0)
22364#define st_is_member(table,key) st_lookup((table),(key),(st_data_t *)0)
22365#define st_init_table rb_st_init_table
22366#define st_init_table_with_size rb_st_init_table_with_size
22367#define st_init_numtable rb_st_init_numtable
22368#define st_init_numtable_with_size rb_st_init_numtable_with_size
22369#define st_init_strtable rb_st_init_strtable
22370#define st_init_strtable_with_size rb_st_init_strtable_with_size
22371#define st_init_strcasetable rb_st_init_strcasetable
22372#define st_init_strcasetable_with_size rb_st_init_strcasetable_with_size
22373#define st_delete rb_st_delete
22374#define st_delete_safe rb_st_delete_safe
22375#define st_shift rb_st_shift
22376#define st_insert rb_st_insert
22377#define st_insert2 rb_st_insert2
22378#define st_lookup rb_st_lookup
22379#define st_get_key rb_st_get_key
22380#define st_update rb_st_update
22381#define st_foreach_with_replace rb_st_foreach_with_replace
22382#define st_foreach rb_st_foreach
22383#define st_foreach_check rb_st_foreach_check
22384#define st_keys rb_st_keys
22385#define st_keys_check rb_st_keys_check
22386#define st_values rb_st_values
22387#define st_values_check rb_st_values_check
22388#define st_add_direct rb_st_add_direct
22389#define st_free_table rb_st_free_table
22390#define st_cleanup_safe rb_st_cleanup_safe
22391#define st_clear rb_st_clear
22392#define st_copy rb_st_copy
22393#define st_numcmp rb_st_numcmp
22394#define st_numhash rb_st_numhash
22395#define st_locale_insensitive_strcasecmp rb_st_locale_insensitive_strcasecmp
22396#define st_locale_insensitive_strncasecmp rb_st_locale_insensitive_strncasecmp
22397#define st_strcasecmp rb_st_locale_insensitive_strcasecmp
22398#define st_strncasecmp rb_st_locale_insensitive_strncasecmp
22399#define st_memsize rb_st_memsize
22400#define st_hash rb_st_hash
22401#define st_hash_uint32 rb_st_hash_uint32
22402#define st_hash_uint rb_st_hash_uint
22403#define st_hash_end rb_st_hash_end
22404#define st_hash_start(h) ((st_index_t)(h))
22405#pragma GCC visibility pop
22406#define ST2FIX RB_ST2FIX
22407#define RB_ST2FIX RB_ST2FIX
22408#define RBIMPL_ARITHMETIC_UID_T_H
22409#define RBIMPL_CORE_H
22410#define RBIMPL_RARRAY_H
22411#define RBIMPL_RGENGC_H
22412#undef USE_RGENGC
22413#define USE_RGENGC 1
22414#define USE_RINCGC 1
22415#define USE_RGENGC_LOGGING_WB_UNPROTECT 0
22416#define RGENGC_WB_PROTECTED_ARRAY 1
22417#define RGENGC_WB_PROTECTED_HASH 1
22418#define RGENGC_WB_PROTECTED_STRUCT 1
22419#define RGENGC_WB_PROTECTED_STRING 1
22420#define RGENGC_WB_PROTECTED_OBJECT 1
22421#define RGENGC_WB_PROTECTED_REGEXP 1
22422#define RGENGC_WB_PROTECTED_CLASS 1
22423#define RGENGC_WB_PROTECTED_FLOAT 1
22424#define RGENGC_WB_PROTECTED_COMPLEX 1
22425#define RGENGC_WB_PROTECTED_RATIONAL 1
22426#define RGENGC_WB_PROTECTED_BIGNUM 1
22427#define RGENGC_WB_PROTECTED_NODE_CREF 1
22428#define RB_OBJ_WRITE(a,slot,b) RBIMPL_CAST(rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__))
22429#define RB_OBJ_WRITTEN(a,oldv,b) RBIMPL_CAST(rb_obj_written((VALUE)(a), (VALUE)(oldv), (VALUE)(b), __FILE__, __LINE__))
22430#define OBJ_PROMOTED_RAW RB_OBJ_PROMOTED_RAW
22431#define OBJ_PROMOTED RB_OBJ_PROMOTED
22432#define OBJ_WB_UNPROTECT RB_OBJ_WB_UNPROTECT
22433#define RB_OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__)
22434#define RB_OBJ_WB_UNPROTECT_FOR(type,obj) (RGENGC_WB_PROTECTED_ ##type ? OBJ_WB_UNPROTECT(obj) : obj)
22435#define RGENGC_LOGGING_WB_UNPROTECT rb_gc_unprotect_logging
22436#define RB_OBJ_PROMOTED_RAW RB_OBJ_PROMOTED_RAW
22437#define RB_OBJ_PROMOTED RB_OBJ_PROMOTED
22438#pragma GCC visibility push(default)
22439#pragma GCC visibility pop
22440#define USE_TRANSIENT_HEAP 1
22441#define RARRAY(obj) RBIMPL_CAST((struct RArray *)(obj))
22442#define RARRAY_EMBED_FLAG RARRAY_EMBED_FLAG
22443#define RARRAY_EMBED_LEN_MASK RARRAY_EMBED_LEN_MASK
22444#define RARRAY_EMBED_LEN_MAX RARRAY_EMBED_LEN_MAX
22445#define RARRAY_EMBED_LEN_SHIFT RARRAY_EMBED_LEN_SHIFT
22446#define RARRAY_TRANSIENT_FLAG RARRAY_TRANSIENT_FLAG
22447#define RARRAY_LEN rb_array_len
22448#define RARRAY_CONST_PTR rb_array_const_ptr
22449#define RARRAY_CONST_PTR_TRANSIENT rb_array_const_ptr_transient
22450#define FIX_CONST_VALUE_PTR(x) (x)
22451#define RARRAY_EMBED_LEN RARRAY_EMBED_LEN
22452#define RARRAY_LENINT RARRAY_LENINT
22453#define RARRAY_TRANSIENT_P RARRAY_TRANSIENT_P
22454#define RARRAY_ASET RARRAY_ASET
22455#define RARRAY_PTR RARRAY_PTR
22456#pragma GCC visibility push(default)
22457#pragma GCC visibility pop
22458#define RBIMPL_RARRAY_STMT(flag,ary,var,expr) do { RBIMPL_ASSERT_TYPE((ary), RUBY_T_ARRAY); const VALUE rbimpl_ary = (ary); VALUE *var = rb_array_ptr_use_start(rbimpl_ary, (flag)); expr; rb_array_ptr_use_end(rbimpl_ary, (flag)); } while (0)
22459#define RARRAY_PTR_USE_START(a) rb_array_ptr_use_start(a, 0)
22460#define RARRAY_PTR_USE_END(a) rb_array_ptr_use_end(a, 0)
22461#define RARRAY_PTR_USE(ary,ptr_name,expr) RBIMPL_RARRAY_STMT(0, ary, ptr_name, expr)
22462#define RARRAY_PTR_USE_START_TRANSIENT(a) rb_array_ptr_use_start(a, 1)
22463#define RARRAY_PTR_USE_END_TRANSIENT(a) rb_array_ptr_use_end(a, 1)
22464#define RARRAY_PTR_USE_TRANSIENT(ary,ptr_name,expr) RBIMPL_RARRAY_STMT(1, ary, ptr_name, expr)
22465#define RARRAY_AREF(a,i) RARRAY_CONST_PTR_TRANSIENT(a)[i]
22466#define RBIMPL_RBIGNUM_H
22467#define RBIGNUM_SIGN rb_big_sign
22468#define RBIGNUM_POSITIVE_P RBIGNUM_POSITIVE_P
22469#define RBIGNUM_NEGATIVE_P RBIGNUM_NEGATIVE_P
22470#pragma GCC visibility push(default)
22471#pragma GCC visibility pop
22472#define RBIMPL_RCLASS_H
22473#define RMODULE_IS_OVERLAID RMODULE_IS_OVERLAID
22474#define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT
22475#define RMODULE_INCLUDED_INTO_REFINEMENT RMODULE_INCLUDED_INTO_REFINEMENT
22476#define RCLASS(obj) RBIMPL_CAST((struct RClass *)(obj))
22477#define RMODULE RCLASS
22478#define RCLASS_SUPER rb_class_get_superclass
22479#pragma GCC visibility push(default)
22480#pragma GCC visibility pop
22481#define RBIMPL_RDATA_H
22482#define RUBY_UNTYPED_DATA_WARNING 1
22483#define RBIMPL_DATA_FUNC(f) RBIMPL_CAST((void (*)(void *))(f))
22484#define RBIMPL_ATTRSET_UNTYPED_DATA_FUNC() RBIMPL_ATTR_WARNING(("untyped Data is unsafe; use TypedData instead")) RBIMPL_ATTR_DEPRECATED(("by TypedData"))
22485#define RDATA(obj) RBIMPL_CAST((struct RData *)(obj))
22486#define DATA_PTR(obj) RDATA(obj)->data
22487#define RUBY_MACRO_SELECT RBIMPL_TOKEN_PASTE
22488#define RUBY_DEFAULT_FREE RBIMPL_DATA_FUNC(-1)
22489#define RUBY_NEVER_FREE RBIMPL_DATA_FUNC(0)
22490#define RUBY_UNTYPED_DATA_FUNC(f) f RBIMPL_ATTRSET_UNTYPED_DATA_FUNC()
22491#pragma GCC visibility push(default)
22492#pragma GCC visibility pop
22493#define Data_Wrap_Struct(klass,mark,free,sval) rb_data_object_wrap( (klass), (sval), RBIMPL_DATA_FUNC(mark), RBIMPL_DATA_FUNC(free))
22494#define Data_Make_Struct0(result,klass,type,size,mark,free,sval) VALUE result = rb_data_object_zalloc( (klass), (size), RBIMPL_DATA_FUNC(mark), RBIMPL_DATA_FUNC(free)); (sval) = RBIMPL_CAST((type *)DATA_PTR(result)); RBIMPL_CAST( (void)(sval))
22495#define Data_Make_Struct(klass,type,mark,free,sval) RB_GNUC_EXTENSION({ Data_Make_Struct0( data_struct_obj, klass, type, sizeof(type), mark, free, sval); data_struct_obj; })
22496#define Data_Get_Struct(obj,type,sval) ((sval) = RBIMPL_CAST((type*)rb_data_object_get(obj)))
22497#define rb_data_object_wrap_warning(klass,ptr,mark,free) RB_GNUC_EXTENSION( __builtin_choose_expr( __builtin_constant_p(klass) && !(klass), rb_data_object_wrap(klass, ptr, mark, free), (rb_data_object_wrap_warning)(klass, ptr, mark, free)))
22498#define rb_cData rb_cData()
22499#define rb_data_object_wrap_0 rb_data_object_wrap
22500#define rb_data_object_wrap_1 rb_data_object_wrap_warning
22501#define rb_data_object_wrap RUBY_MACRO_SELECT(rb_data_object_wrap_, RUBY_UNTYPED_DATA_WARNING)
22502#define rb_data_object_get_0 rb_data_object_get
22503#define rb_data_object_get_1 rb_data_object_get_warning
22504#define rb_data_object_get RUBY_MACRO_SELECT(rb_data_object_get_, RUBY_UNTYPED_DATA_WARNING)
22505#define rb_data_object_make_0 rb_data_object_make
22506#define rb_data_object_make_1 rb_data_object_make_warning
22507#define rb_data_object_make RUBY_MACRO_SELECT(rb_data_object_make_, RUBY_UNTYPED_DATA_WARNING)
22508#define RBIMPL_RFILE_H
22509#define RFILE(obj) RBIMPL_CAST((struct RFile *)(obj))
22510#define RBIMPL_RHASH_H
22511#define RHASH_TBL(h) rb_hash_tbl(h, __FILE__, __LINE__)
22512#define RHASH_ITER_LEV(h) rb_hash_iter_lev(h)
22513#define RHASH_IFNONE(h) rb_hash_ifnone(h)
22514#define RHASH_SIZE(h) rb_hash_size_num(h)
22515#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0)
22516#define RHASH_SET_IFNONE(h,ifnone) rb_hash_set_ifnone((VALUE)h, ifnone)
22517#pragma GCC visibility push(default)
22518#pragma GCC visibility pop
22519#define RBIMPL_ROBJECT_H
22520#define ROBJECT(obj) RBIMPL_CAST((struct RObject *)(obj))
22521#define ROBJECT_EMBED_LEN_MAX ROBJECT_EMBED_LEN_MAX
22522#define ROBJECT_EMBED ROBJECT_EMBED
22523#define ROBJECT_NUMIV ROBJECT_NUMIV
22524#define ROBJECT_IVPTR ROBJECT_IVPTR
22525#define ROBJECT_IV_INDEX_TBL ROBJECT_IV_INDEX_TBL
22526#define RBIMPL_RREGEXP_H
22527#define RREGEXP(obj) RBIMPL_CAST((struct RRegexp *)(obj))
22528#define RREGEXP_PTR(obj) (RREGEXP(obj)->ptr)
22529#define RREGEXP_SRC RREGEXP_SRC
22530#define RREGEXP_SRC_PTR RREGEXP_SRC_PTR
22531#define RREGEXP_SRC_LEN RREGEXP_SRC_LEN
22532#define RREGEXP_SRC_END RREGEXP_SRC_END
22533#define RBIMPL_RSTRUCT_H
22534#define RSTRUCT_PTR(st) rb_struct_ptr(st)
22535#define RSTRUCT_LEN RSTRUCT_LEN
22536#define RSTRUCT_SET RSTRUCT_SET
22537#define RSTRUCT_GET RSTRUCT_GET
22538#pragma GCC visibility push(default)
22539#pragma GCC visibility pop
22540#define RBIMPL_RTYPEDDATA_H
22541#define RBIMPL_ERROR_H
22542#pragma GCC visibility push(default)
22543#define RB_IO_WAIT_READABLE RB_IO_WAIT_READABLE
22544#define RB_IO_WAIT_WRITABLE RB_IO_WAIT_WRITABLE
22545#define ruby_verbose (*rb_ruby_verbose_ptr())
22546#define ruby_debug (*rb_ruby_debug_ptr())
22547#pragma GCC visibility pop
22548#define HAVE_TYPE_RB_DATA_TYPE_T 1
22549#define HAVE_RB_DATA_TYPE_T_FUNCTION 1
22550#define HAVE_RB_DATA_TYPE_T_PARENT 1
22551#define RUBY_TYPED_DEFAULT_FREE RUBY_DEFAULT_FREE
22552#define RUBY_TYPED_NEVER_FREE RUBY_NEVER_FREE
22553#define RTYPEDDATA(obj) RBIMPL_CAST((struct RTypedData *)(obj))
22554#define RTYPEDDATA_DATA(v) (RTYPEDDATA(v)->data)
22555#define Check_TypedStruct(v,t) rb_check_typeddata(RBIMPL_CAST((VALUE)(v)), (t))
22556#define RTYPEDDATA_P RTYPEDDATA_P
22557#define RTYPEDDATA_TYPE RTYPEDDATA_TYPE
22558#define RUBY_TYPED_FREE_IMMEDIATELY RUBY_TYPED_FREE_IMMEDIATELY
22559#define RUBY_TYPED_FROZEN_SHAREABLE RUBY_TYPED_FROZEN_SHAREABLE
22560#define RUBY_TYPED_WB_PROTECTED RUBY_TYPED_WB_PROTECTED
22561#define RUBY_TYPED_PROMOTED1 RUBY_TYPED_PROMOTED1
22562#pragma GCC visibility push(default)
22563#pragma GCC visibility pop
22564#define TypedData_Wrap_Struct(klass,data_type,sval) rb_data_typed_object_wrap((klass),(sval),(data_type))
22565#define TypedData_Make_Struct0(result,klass,type,size,data_type,sval) VALUE result = rb_data_typed_object_zalloc(klass, size, data_type); (sval) = RBIMPL_CAST((type *)RTYPEDDATA_DATA(result)); RBIMPL_CAST( (void)(sval))
22566#define TypedData_Make_Struct(klass,type,data_type,sval) RB_GNUC_EXTENSION({ TypedData_Make_Struct0( data_struct_obj, klass, type, sizeof(type), data_type, sval); data_struct_obj; })
22567#define TypedData_Get_Struct(obj,type,data_type,sval) ((sval) = RBIMPL_CAST((type *)rb_check_typeddata((obj), (data_type))))
22568#define RBIMPL_CTYPE_H
22569#define _CTYPE_H 1
22570#define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8))
22571#define __isctype(c,type) ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
22572#define __isascii(c) (((c) & ~0x7f) == 0)
22573#define __toascii(c) ((c) & 0x7f)
22574#define __exctype(name) extern int name (int) __THROW
22575#define __tobody(c,f,a,args) (__extension__ ({ int __res; if (sizeof (c) > 1) { if (__builtin_constant_p (c)) { int __c = (c); __res = __c < -128 || __c > 255 ? __c : (a)[__c]; } else __res = f args; } else __res = (a)[(int) (c)]; __res; }))
22576#define isalnum(c) __isctype((c), _ISalnum)
22577#define isalpha(c) __isctype((c), _ISalpha)
22578#define iscntrl(c) __isctype((c), _IScntrl)
22579#define isdigit(c) __isctype((c), _ISdigit)
22580#define islower(c) __isctype((c), _ISlower)
22581#define isgraph(c) __isctype((c), _ISgraph)
22582#define isprint(c) __isctype((c), _ISprint)
22583#define ispunct(c) __isctype((c), _ISpunct)
22584#define isspace(c) __isctype((c), _ISspace)
22585#define isupper(c) __isctype((c), _ISupper)
22586#define isxdigit(c) __isctype((c), _ISxdigit)
22587#define isblank(c) __isctype((c), _ISblank)
22588#define tolower(c) __tobody (c, tolower, *__ctype_tolower_loc (), (c))
22589#define toupper(c) __tobody (c, toupper, *__ctype_toupper_loc (), (c))
22590#define isascii(c) __isascii (c)
22591#define toascii(c) __toascii (c)
22592#define _tolower(c) ((int) (*__ctype_tolower_loc ())[(int) (c)])
22593#define _toupper(c) ((int) (*__ctype_toupper_loc ())[(int) (c)])
22594#define __isctype_l(c,type,locale) ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type)
22595#define __exctype_l(name) extern int name (int, locale_t) __THROW
22596#define __tolower_l(c,locale) __tobody (c, __tolower_l, (locale)->__ctype_tolower, (c, locale))
22597#define __toupper_l(c,locale) __tobody (c, __toupper_l, (locale)->__ctype_toupper, (c, locale))
22598#define tolower_l(c,locale) __tolower_l ((c), (locale))
22599#define toupper_l(c,locale) __toupper_l ((c), (locale))
22600#define __isalnum_l(c,l) __isctype_l((c), _ISalnum, (l))
22601#define __isalpha_l(c,l) __isctype_l((c), _ISalpha, (l))
22602#define __iscntrl_l(c,l) __isctype_l((c), _IScntrl, (l))
22603#define __isdigit_l(c,l) __isctype_l((c), _ISdigit, (l))
22604#define __islower_l(c,l) __isctype_l((c), _ISlower, (l))
22605#define __isgraph_l(c,l) __isctype_l((c), _ISgraph, (l))
22606#define __isprint_l(c,l) __isctype_l((c), _ISprint, (l))
22607#define __ispunct_l(c,l) __isctype_l((c), _ISpunct, (l))
22608#define __isspace_l(c,l) __isctype_l((c), _ISspace, (l))
22609#define __isupper_l(c,l) __isctype_l((c), _ISupper, (l))
22610#define __isxdigit_l(c,l) __isctype_l((c), _ISxdigit, (l))
22611#define __isblank_l(c,l) __isctype_l((c), _ISblank, (l))
22612#define __isascii_l(c,l) ((l), __isascii (c))
22613#define __toascii_l(c,l) ((l), __toascii (c))
22614#define isalnum_l(c,l) __isalnum_l ((c), (l))
22615#define isalpha_l(c,l) __isalpha_l ((c), (l))
22616#define iscntrl_l(c,l) __iscntrl_l ((c), (l))
22617#define isdigit_l(c,l) __isdigit_l ((c), (l))
22618#define islower_l(c,l) __islower_l ((c), (l))
22619#define isgraph_l(c,l) __isgraph_l ((c), (l))
22620#define isprint_l(c,l) __isprint_l ((c), (l))
22621#define ispunct_l(c,l) __ispunct_l ((c), (l))
22622#define isspace_l(c,l) __isspace_l ((c), (l))
22623#define isupper_l(c,l) __isupper_l ((c), (l))
22624#define isxdigit_l(c,l) __isxdigit_l ((c), (l))
22625#define isblank_l(c,l) __isblank_l ((c), (l))
22626#define isascii_l(c,l) __isascii_l ((c), (l))
22627#define toascii_l(c,l) __toascii_l ((c), (l))
22628#define ISASCII rb_isascii
22629#define ISPRINT rb_isprint
22630#define ISGRAPH rb_isgraph
22631#define ISSPACE rb_isspace
22632#define ISUPPER rb_isupper
22633#define ISLOWER rb_islower
22634#define ISALNUM rb_isalnum
22635#define ISALPHA rb_isalpha
22636#define ISDIGIT rb_isdigit
22637#define ISXDIGIT rb_isxdigit
22638#define ISBLANK rb_isblank
22639#define ISCNTRL rb_iscntrl
22640#define ISPUNCT rb_ispunct
22641#define TOUPPER rb_toupper
22642#define TOLOWER rb_tolower
22643#define STRCASECMP st_locale_insensitive_strcasecmp
22644#define STRNCASECMP st_locale_insensitive_strncasecmp
22645#define STRTOUL ruby_strtoul
22646#pragma GCC visibility push(default)
22647#pragma GCC visibility pop
22648#define RBIMPL_EVAL_H
22649#pragma GCC visibility push(default)
22650#define rb_funcall2 rb_funcallv
22651#define rb_funcall3 rb_funcallv_public
22652#pragma GCC visibility pop
22653#define RBIMPL_EVENT_H
22654#pragma GCC visibility push(default)
22655#define RUBY_EVENT_NONE 0x0000
22656#define RUBY_EVENT_LINE 0x0001
22657#define RUBY_EVENT_CLASS 0x0002
22658#define RUBY_EVENT_END 0x0004
22659#define RUBY_EVENT_CALL 0x0008
22660#define RUBY_EVENT_RETURN 0x0010
22661#define RUBY_EVENT_C_CALL 0x0020
22662#define RUBY_EVENT_C_RETURN 0x0040
22663#define RUBY_EVENT_RAISE 0x0080
22664#define RUBY_EVENT_ALL 0x00ff
22665#define RUBY_EVENT_B_CALL 0x0100
22666#define RUBY_EVENT_B_RETURN 0x0200
22667#define RUBY_EVENT_THREAD_BEGIN 0x0400
22668#define RUBY_EVENT_THREAD_END 0x0800
22669#define RUBY_EVENT_FIBER_SWITCH 0x1000
22670#define RUBY_EVENT_SCRIPT_COMPILED 0x2000
22671#define RUBY_EVENT_TRACEPOINT_ALL 0xffff
22672#define RUBY_EVENT_RESERVED_FOR_INTERNAL_USE 0x030000
22673#define RUBY_INTERNAL_EVENT_SWITCH 0x040000
22674#define RUBY_EVENT_SWITCH 0x040000
22675#define RUBY_INTERNAL_EVENT_NEWOBJ 0x100000
22676#define RUBY_INTERNAL_EVENT_FREEOBJ 0x200000
22677#define RUBY_INTERNAL_EVENT_GC_START 0x400000
22678#define RUBY_INTERNAL_EVENT_GC_END_MARK 0x800000
22679#define RUBY_INTERNAL_EVENT_GC_END_SWEEP 0x1000000
22680#define RUBY_INTERNAL_EVENT_GC_ENTER 0x2000000
22681#define RUBY_INTERNAL_EVENT_GC_EXIT 0x4000000
22682#define RUBY_INTERNAL_EVENT_OBJSPACE_MASK 0x7f00000
22683#define RUBY_INTERNAL_EVENT_MASK 0xffff0000
22684#define RB_EVENT_HOOKS_HAVE_CALLBACK_DATA 1
22685#pragma GCC visibility pop
22686#define RBIMPL_GC_H
22687#pragma GCC visibility push(default)
22688#pragma GCC visibility pop
22689#define RBIMPL_GLOB_H
22690#pragma GCC visibility push(default)
22691#pragma GCC visibility pop
22692#define RBIMPL_GLOBALS_H
22693#pragma GCC visibility push(default)
22694#define RUBY_INTEGER_UNIFICATION 1
22695#define CLASS_OF rb_class_of
22696#pragma GCC visibility pop
22697#define RBIMPL_INTERPRETER_H
22698#pragma GCC visibility push(default)
22699#define RUBY_INIT_STACK VALUE variable_in_this_stack_frame; ruby_init_stack(&variable_in_this_stack_frame);
22700#pragma GCC visibility pop
22701#define RBIMPL_ITERATOR_H
22702#pragma GCC visibility push(default)
22703#define RB_BLOCK_CALL_FUNC_STRICT 1
22704#define RUBY_BLOCK_CALL_FUNC_TAKES_BLOCKARG 1
22705#define RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg,callback_arg) VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg
22706#pragma GCC visibility pop
22707#define RBIMPL_MEMORY_H
22708#define DSIZE_T uint128_t
22709#define RUBY_ALLOCV_LIMIT 1024
22710#define RB_GC_GUARD(v) (*__extension__ ({ volatile VALUE *rb_gc_guarded_ptr = &(v); __asm__("" : : "m"(rb_gc_guarded_ptr)); rb_gc_guarded_ptr; }))
22711#define RB_ALLOC_N(type,n) RBIMPL_CAST((type *)ruby_xmalloc2((n), sizeof(type)))
22712#define RB_ALLOC(type) RBIMPL_CAST((type *)ruby_xmalloc(sizeof(type)))
22713#define RB_ZALLOC_N(type,n) RBIMPL_CAST((type *)ruby_xcalloc((n), sizeof(type)))
22714#define RB_ZALLOC(type) (RB_ZALLOC_N(type, 1))
22715#define RB_REALLOC_N(var,type,n) ((var) = RBIMPL_CAST((type *)ruby_xrealloc2((void *)(var), (n), sizeof(type))))
22716#define ALLOCA_N(type,n) RBIMPL_CAST((type *)alloca(rbimpl_size_mul_or_raise(sizeof(type), (n))))
22717#define RB_ALLOCV(v,n) ((n) < RUBY_ALLOCV_LIMIT ? ((v) = 0, alloca(n)) : rb_alloc_tmp_buffer(&(v), (n)))
22718#define RB_ALLOCV_N(type,v,n) RBIMPL_CAST((type *) (((size_t)(n) < RUBY_ALLOCV_LIMIT / sizeof(type)) ? ((v) = 0, alloca((n) * sizeof(type))) : rb_alloc_tmp_buffer2(&(v), (n), sizeof(type))))
22719#define RB_ALLOCV_END(v) rb_free_tmp_buffer(&(v))
22720#define MEMZERO(p,type,n) memset((p), 0, rbimpl_size_mul_or_raise(sizeof(type), (n)))
22721#define MEMCPY(p1,p2,type,n) memcpy((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n)))
22722#define MEMMOVE(p1,p2,type,n) memmove((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n)))
22723#define MEMCMP(p1,p2,type,n) memcmp((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n)))
22724#define ALLOC_N RB_ALLOC_N
22725#define ALLOC RB_ALLOC
22726#define ZALLOC_N RB_ZALLOC_N
22727#define ZALLOC RB_ZALLOC
22728#define REALLOC_N RB_REALLOC_N
22729#define ALLOCV RB_ALLOCV
22730#define ALLOCV_N RB_ALLOCV_N
22731#define ALLOCV_END RB_ALLOCV_END
22732#pragma GCC visibility push(default)
22733#pragma GCC visibility pop
22734#undef memcpy
22735#define memcpy ruby_nonempty_memcpy
22736#define RBIMPL_MODULE_H
22737#pragma GCC visibility push(default)
22738#pragma GCC visibility pop
22739#define RBIMPL_NEWOBJ_H
22740#define RB_NEWOBJ(obj,type) type *(obj) = RBIMPL_CAST((type *)rb_newobj())
22741#define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = RBIMPL_CAST((type *)rb_newobj_of(klass, flags))
22742#define NEWOBJ RB_NEWOBJ
22743#define NEWOBJ_OF RB_NEWOBJ_OF
22744#define OBJSETUP rb_obj_setup
22745#define CLONESETUP rb_clone_setup
22746#define DUPSETUP rb_dup_setup
22747#pragma GCC visibility push(default)
22748#pragma GCC visibility pop
22749#define RBIMPL_SCAN_ARGS_H
22750#define RBIMPL_ATTR_DIAGNOSE_IF_H
22751#define RBIMPL_ATTR_DIAGNOSE_IF(_,__,___)
22752#define RBIMPL_INTERN_ARRAY_H
22753#pragma GCC visibility push(default)
22754#define rb_ary_new2 rb_ary_new_capa
22755#define rb_ary_new3 rb_ary_new_from_args
22756#define rb_ary_new4 rb_ary_new_from_values
22757#pragma GCC visibility pop
22758#define RBIMPL_INTERN_ERROR_H
22759#define UNLIMITED_ARGUMENTS (-1)
22760#define rb_exc_new2 rb_exc_new_cstr
22761#define rb_exc_new3 rb_exc_new_str
22762#define rb_check_trusted rb_check_trusted
22763#define rb_check_trusted_inline rb_check_trusted
22764#define rb_check_arity rb_check_arity
22765#pragma GCC visibility push(default)
22766#pragma GCC visibility pop
22767#define rb_check_frozen_internal(obj) do { VALUE frozen_obj = (obj); if (RB_UNLIKELY(RB_OBJ_FROZEN(frozen_obj))) { rb_error_frozen_object(frozen_obj); } } while (0)
22768#define rb_check_frozen rb_check_frozen_inline
22769#define RBIMPL_INTERN_HASH_H
22770#pragma GCC visibility push(default)
22771#define st_foreach_safe rb_st_foreach_safe
22772#pragma GCC visibility pop
22773#define RBIMPL_INTERN_PROC_H
22774#pragma GCC visibility push(default)
22775#pragma GCC visibility pop
22776#define RB_SCAN_ARGS_PASS_CALLED_KEYWORDS 0
22777#define RB_SCAN_ARGS_KEYWORDS 1
22778#define RB_SCAN_ARGS_LAST_HASH_KEYWORDS 3
22779#define RB_NO_KEYWORDS 0
22780#define RB_PASS_KEYWORDS 1
22781#define RB_PASS_CALLED_KEYWORDS rb_keyword_given_p()
22782#define HAVE_RB_SCAN_ARGS_OPTIONAL_HASH 1
22783#pragma GCC visibility push(default)
22784#pragma GCC visibility pop
22785#define rb_scan_args_isdigit(c) (RBIMPL_CAST((unsigned char)((c)-'0'))<10)
22786#define rb_scan_args_count_end(fmt,ofs,vari) ((fmt)[ofs] ? -1 : (vari))
22787#define rb_scan_args_count_block(fmt,ofs,vari) ((fmt)[ofs]!='&' ? rb_scan_args_count_end(fmt, ofs, vari) : rb_scan_args_count_end(fmt, (ofs)+1, (vari)+1))
22788#define rb_scan_args_count_hash(fmt,ofs,vari) ((fmt)[ofs]!=':' ? rb_scan_args_count_block(fmt, ofs, vari) : rb_scan_args_count_block(fmt, (ofs)+1, (vari)+1))
22789#define rb_scan_args_count_trail(fmt,ofs,vari) (!rb_scan_args_isdigit((fmt)[ofs]) ? rb_scan_args_count_hash(fmt, ofs, vari) : rb_scan_args_count_hash(fmt, (ofs)+1, (vari)+((fmt)[ofs]-'0')))
22790#define rb_scan_args_count_var(fmt,ofs,vari) ((fmt)[ofs]!='*' ? rb_scan_args_count_trail(fmt, ofs, vari) : rb_scan_args_count_trail(fmt, (ofs)+1, (vari)+1))
22791#define rb_scan_args_count_opt(fmt,ofs,vari) (!rb_scan_args_isdigit((fmt)[ofs]) ? rb_scan_args_count_var(fmt, ofs, vari) : rb_scan_args_count_var(fmt, (ofs)+1, (vari)+(fmt)[ofs]-'0'))
22792#define rb_scan_args_count_lead(fmt,ofs,vari) (!rb_scan_args_isdigit((fmt)[ofs]) ? rb_scan_args_count_var(fmt, ofs, vari) : rb_scan_args_count_opt(fmt, (ofs)+1, (vari)+(fmt)[ofs]-'0'))
22793#define rb_scan_args_count(fmt) rb_scan_args_count_lead(fmt, 0, 0)
22794#define rb_scan_args_verify(fmt,varc) (sizeof(char[1-2*(rb_scan_args_count(fmt)<0)])!=1 ? rb_scan_args_bad_format(fmt) : sizeof(char[1-2*(rb_scan_args_count(fmt)!=(varc))])!=1 ? rb_scan_args_length_mismatch(fmt, varc) : RBIMPL_ASSERT_NOTHING)
22795#define rb_scan_args0(argc,argv,fmt,varc,vars) rb_scan_args_set(RB_SCAN_ARGS_PASS_CALLED_KEYWORDS, argc, argv, rb_scan_args_n_lead(fmt), rb_scan_args_n_opt(fmt), rb_scan_args_n_trail(fmt), rb_scan_args_f_var(fmt), rb_scan_args_f_hash(fmt), rb_scan_args_f_block(fmt), (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
22796#define rb_scan_args_kw0(kw_flag,argc,argv,fmt,varc,vars) rb_scan_args_set(kw_flag, argc, argv, rb_scan_args_n_lead(fmt), rb_scan_args_n_opt(fmt), rb_scan_args_n_trail(fmt), rb_scan_args_f_var(fmt), rb_scan_args_f_hash(fmt), rb_scan_args_f_block(fmt), (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
22797#define rb_scan_args_next_param() vars[vari++]
22798#undef rb_scan_args_next_param
22799#define rb_scan_args(argc,argvp,fmt,...) __builtin_choose_expr( __builtin_constant_p(fmt), rb_scan_args0( argc, argvp, fmt, (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), ((VALUE*[]){__VA_ARGS__})), (rb_scan_args)(argc, argvp, fmt __VA_OPT__(, __VA_ARGS__)))
22800#define rb_scan_args_kw(kw_flag,argc,argvp,fmt,...) __builtin_choose_expr( __builtin_constant_p(fmt), rb_scan_args_kw0( kw_flag, argc, argvp, fmt, (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), ((VALUE*[]){__VA_ARGS__})), (rb_scan_args_kw)(kw_flag, argc, argvp, fmt __VA_OPT__(, __VA_ARGS__)))
22801#define RBIMPL_SYMBOL_H
22802#define RB_ID2SYM rb_id2sym
22803#define RB_SYM2ID rb_sym2id
22804#define ID2SYM RB_ID2SYM
22805#define SYM2ID RB_SYM2ID
22806#define CONST_ID_CACHE RUBY_CONST_ID_CACHE
22807#define CONST_ID RUBY_CONST_ID
22808#define rb_intern_const rb_intern_const
22809#pragma GCC visibility push(default)
22810#pragma GCC visibility pop
22811#define RUBY_CONST_ID_CACHE(result,str) { static ID rb_intern_id_cache; rbimpl_intern_const(&rb_intern_id_cache, (str)); result rb_intern_id_cache; }
22812#define RUBY_CONST_ID(var,str) do { static ID rbimpl_id; (var) = rbimpl_intern_const(&rbimpl_id, (str)); } while (0)
22813#define rb_intern(str) (RBIMPL_CONSTANT_P(str) ? __extension__ ({ static ID rbimpl_id; rbimpl_intern_const(&rbimpl_id, (str)); }) : (rb_intern)(str))
22814#define RBIMPL_VARIABLE_H
22815#pragma GCC visibility push(default)
22816#pragma GCC visibility pop
22817#define RUBY_BACKWARD2_INTTYPES_H
22818#define PRI_INT_PREFIX ""
22819#define PRI_LONG_PREFIX "l"
22820#define PRI_SHORT_PREFIX "h"
22821#define PRI_64_PREFIX PRI_LONG_PREFIX
22822#define RUBY_PRI_VALUE_MARK "\v"
22823#define PRIdVALUE PRI_VALUE_PREFIX"d"
22824#define PRIoVALUE PRI_VALUE_PREFIX"o"
22825#define PRIuVALUE PRI_VALUE_PREFIX"u"
22826#define PRIxVALUE PRI_VALUE_PREFIX"x"
22827#define PRIXVALUE PRI_VALUE_PREFIX"X"
22828#define PRIsVALUE PRI_VALUE_PREFIX"i" RUBY_PRI_VALUE_MARK
22829#define PRIdPTRDIFF PRI_PTRDIFF_PREFIX"d"
22830#define PRIiPTRDIFF PRI_PTRDIFF_PREFIX"i"
22831#define PRIoPTRDIFF PRI_PTRDIFF_PREFIX"o"
22832#define PRIuPTRDIFF PRI_PTRDIFF_PREFIX"u"
22833#define PRIxPTRDIFF PRI_PTRDIFF_PREFIX"x"
22834#define PRIXPTRDIFF PRI_PTRDIFF_PREFIX"X"
22835#define PRIdSIZE PRI_SIZE_PREFIX"d"
22836#define PRIiSIZE PRI_SIZE_PREFIX"i"
22837#define PRIoSIZE PRI_SIZE_PREFIX"o"
22838#define PRIuSIZE PRI_SIZE_PREFIX"u"
22839#define PRIxSIZE PRI_SIZE_PREFIX"x"
22840#define PRIXSIZE PRI_SIZE_PREFIX"X"
22841#pragma GCC visibility push(default)
22842#define USE_SYMBOL_AS_METHOD_NAME 1
22843#define FilePathValue(v) (RB_GC_GUARD(v) = rb_get_path(v))
22844#define FilePathStringValue(v) ((v) = rb_get_path(v))
22845#define rb_varargs_argc_check_runtime(argc,vargc) (((argc) <= (vargc)) ? (argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", argc, vargc), 0))
22846#define rb_varargs_argc_valid_p(argc,vargc) ((argc) == 0 ? (vargc) <= 1 : (argc) == (vargc))
22847#define rb_varargs_argc_check(argc,vargc) __builtin_choose_expr(__builtin_constant_p(argc), (rb_varargs_argc_valid_p(argc, vargc) ? (argc) : rb_varargs_bad_length(argc, vargc)), rb_varargs_argc_check_runtime(argc, vargc))
22848#define RUBY_INTERN_H 1
22849#define RBIMPL_INTERN_BIGNUM_H
22850#pragma GCC visibility push(default)
22851#define rb_big2int(x) rb_big2long(x)
22852#define rb_big2uint(x) rb_big2ulong(x)
22853#define INTEGER_PACK_MSWORD_FIRST 0x01
22854#define INTEGER_PACK_LSWORD_FIRST 0x02
22855#define INTEGER_PACK_MSBYTE_FIRST 0x10
22856#define INTEGER_PACK_LSBYTE_FIRST 0x20
22857#define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40
22858#define INTEGER_PACK_2COMP 0x80
22859#define INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION 0x400
22860#define INTEGER_PACK_FORCE_BIGNUM 0x100
22861#define INTEGER_PACK_NEGATIVE 0x200
22862#define INTEGER_PACK_LITTLE_ENDIAN (INTEGER_PACK_LSWORD_FIRST | INTEGER_PACK_LSBYTE_FIRST)
22863#define INTEGER_PACK_BIG_ENDIAN (INTEGER_PACK_MSWORD_FIRST | INTEGER_PACK_MSBYTE_FIRST)
22864#pragma GCC visibility pop
22865#define RBIMPL_INTERN_COMPAR_H
22866#pragma GCC visibility push(default)
22867#pragma GCC visibility pop
22868#define RBIMPL_INTERN_COMPLEX_H
22869#pragma GCC visibility push(default)
22870#define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
22871#define rb_complex_raw2(x,y) rb_complex_raw((x), (y))
22872#define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0))
22873#define rb_complex_new2(x,y) rb_complex_new((x), (y))
22874#define rb_complex_add rb_complex_plus
22875#define rb_complex_sub rb_complex_minus
22876#define rb_complex_nagate rb_complex_uminus
22877#define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
22878#define rb_Complex2(x,y) rb_Complex((x), (y))
22879#pragma GCC visibility pop
22880#define RBIMPL_INTERN_CONT_H
22881#pragma GCC visibility push(default)
22882#pragma GCC visibility pop
22883#define RBIMPL_INTERN_DIR_H
22884#pragma GCC visibility push(default)
22885#pragma GCC visibility pop
22886#define RBIMPL_INTERN_ENUM_H
22887#pragma GCC visibility push(default)
22888#pragma GCC visibility pop
22889#define RBIMPL_INTERN_ENUMERATOR_H
22890#define RBIMPL_INTERN_EVAL_H
22891#pragma GCC visibility push(default)
22892#pragma GCC visibility pop
22893#pragma GCC visibility push(default)
22894#pragma GCC visibility pop
22895#define SIZED_ENUMERATOR(obj,argc,argv,size_fn) rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()), (argc), (argv), (size_fn))
22896#define SIZED_ENUMERATOR_KW(obj,argc,argv,size_fn,kw_splat) rb_enumeratorize_with_size_kw((obj), ID2SYM(rb_frame_this_func()), (argc), (argv), (size_fn), (kw_splat))
22897#define RETURN_SIZED_ENUMERATOR(obj,argc,argv,size_fn) do { if (!rb_block_given_p()) return SIZED_ENUMERATOR(obj, argc, argv, size_fn); } while (0)
22898#define RETURN_SIZED_ENUMERATOR_KW(obj,argc,argv,size_fn,kw_splat) do { if (!rb_block_given_p()) return SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat); } while (0)
22899#define RETURN_ENUMERATOR(obj,argc,argv) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0)
22900#define RETURN_ENUMERATOR_KW(obj,argc,argv,kw_splat) RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, 0, kw_splat)
22901#define RBIMPL_INTERN_FILE_H
22902#pragma GCC visibility push(default)
22903#pragma GCC visibility pop
22904#define RBIMPL_INTERN_GC_H
22905#pragma GCC visibility push(default)
22906#pragma GCC visibility pop
22907#define RBIMPL_INTERN_IO_H
22908#pragma GCC visibility push(default)
22909#define rb_defout rb_stdout
22910#define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd)
22911#pragma GCC visibility pop
22912#define RBIMPL_INTERN_LOAD_H
22913#pragma GCC visibility push(default)
22914#define RB_EXT_RACTOR_SAFE(f) rb_ext_ractor_safe(f)
22915#define HAVE_RB_EXT_RACTOR_SAFE 1
22916#pragma GCC visibility pop
22917#define RBIMPL_INTERN_MARSHAL_H
22918#pragma GCC visibility push(default)
22919#pragma GCC visibility pop
22920#define RBIMPL_INTERN_NUMERIC_H
22921#pragma GCC visibility push(default)
22922#define RB_NUM_COERCE_FUNCS_NEED_OPID 1
22923#pragma GCC visibility pop
22924#define RBIMPL_INTERN_OBJECT_H
22925#pragma GCC visibility push(default)
22926#define RB_OBJ_INIT_COPY(obj,orig) ((obj) != (orig) && (rb_obj_init_copy((obj), (orig)), 1))
22927#define OBJ_INIT_COPY(obj,orig) RB_OBJ_INIT_COPY(obj, orig)
22928#pragma GCC visibility pop
22929#define RBIMPL_INTERN_PARSE_H
22930#pragma GCC visibility push(default)
22931#pragma GCC visibility pop
22932#define RBIMPL_INTERN_PROCESS_H
22933#pragma GCC visibility push(default)
22934#pragma GCC visibility pop
22935#define RBIMPL_INTERN_RANDOM_H
22936#pragma GCC visibility push(default)
22937#pragma GCC visibility pop
22938#define RBIMPL_INTERN_RANGE_H
22939#pragma GCC visibility push(default)
22940#pragma GCC visibility pop
22941#define RBIMPL_INTERN_RATIONAL_H
22942#pragma GCC visibility push(default)
22943#define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
22944#define rb_rational_raw2(x,y) rb_rational_raw((x), (y))
22945#define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1))
22946#define rb_rational_new2(x,y) rb_rational_new((x), (y))
22947#define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
22948#define rb_Rational2(x,y) rb_Rational((x), (y))
22949#pragma GCC visibility pop
22950#define RBIMPL_INTERN_RE_H
22951#pragma GCC visibility push(default)
22952#define rb_memcmp memcmp
22953#define HAVE_RB_REG_NEW_STR 1
22954#pragma GCC visibility pop
22955#define RBIMPL_INTERN_RUBY_H
22956#pragma GCC visibility push(default)
22957#define rb_argv rb_get_argv()
22958#pragma GCC visibility pop
22959#define RBIMPL_INTERN_SELECT_H
22960#define RBIMPL_INTERN_SELECT_LARGESIZE_H
22961#define rb_fd_ptr rb_fd_ptr
22962#define rb_fd_max rb_fd_max
22963#pragma GCC visibility push(default)
22964#pragma GCC visibility pop
22965#pragma GCC visibility push(default)
22966#pragma GCC visibility pop
22967#define RBIMPL_INTERN_SIGNAL_H
22968#pragma GCC visibility push(default)
22969#define posix_signal ruby_posix_signal
22970#pragma GCC visibility pop
22971#define RBIMPL_INTERN_SPRINTF_H
22972#pragma GCC visibility push(default)
22973#pragma GCC visibility pop
22974#define RBIMPL_INTERN_STRING_H
22975#pragma GCC visibility push(default)
22976#define rb_str_dup_frozen rb_str_new_frozen
22977#define rb_hash_uint32(h,i) st_hash_uint32((h), (i))
22978#define rb_hash_uint(h,i) st_hash_uint((h), (i))
22979#define rb_hash_end(h) st_hash_end(h)
22980#define rb_str_new(str,len) ((RBIMPL_CONSTANT_P(str) && RBIMPL_CONSTANT_P(len) ? rb_str_new_static : rb_str_new) ((str), (len)))
22981#define rb_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_str_new_cstr : rb_str_new_cstr) (str))
22982#define rb_usascii_str_new(str,len) ((RBIMPL_CONSTANT_P(str) && RBIMPL_CONSTANT_P(len) ? rb_usascii_str_new_static : rb_usascii_str_new) ((str), (len)))
22983#define rb_utf8_str_new(str,len) ((RBIMPL_CONSTANT_P(str) && RBIMPL_CONSTANT_P(len) ? rb_utf8_str_new_static : rb_utf8_str_new) ((str), (len)))
22984#define rb_tainted_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_tainted_str_new_cstr : rb_tainted_str_new_cstr) (str))
22985#define rb_usascii_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_usascii_str_new_cstr : rb_usascii_str_new_cstr) (str))
22986#define rb_utf8_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_utf8_str_new_cstr : rb_utf8_str_new_cstr) (str))
22987#define rb_external_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_external_str_new_cstr : rb_external_str_new_cstr) (str))
22988#define rb_locale_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_locale_str_new_cstr : rb_locale_str_new_cstr) (str))
22989#define rb_str_buf_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_str_buf_new_cstr : rb_str_buf_new_cstr) (str))
22990#define rb_str_cat_cstr(buf,str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((buf), (str)))
22991#define rb_exc_new_cstr(exc,str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_exc_new_cstr : rb_exc_new_cstr) ((exc), (str)))
22992#define rb_str_new2 rb_str_new_cstr
22993#define rb_str_new3 rb_str_new_shared
22994#define rb_str_new4 rb_str_new_frozen
22995#define rb_str_new5 rb_str_new_with_class
22996#define rb_tainted_str_new2 rb_tainted_str_new_cstr
22997#define rb_str_buf_new2 rb_str_buf_new_cstr
22998#define rb_usascii_str_new2 rb_usascii_str_new_cstr
22999#define rb_str_buf_cat rb_str_cat
23000#define rb_str_buf_cat2 rb_str_cat_cstr
23001#define rb_str_cat2 rb_str_cat_cstr
23002#define rb_strlen_lit(str) (sizeof(str "") - 1)
23003#define rb_str_new_lit(str) rb_str_new_static((str), rb_strlen_lit(str))
23004#define rb_usascii_str_new_lit(str) rb_usascii_str_new_static((str), rb_strlen_lit(str))
23005#define rb_utf8_str_new_lit(str) rb_utf8_str_new_static((str), rb_strlen_lit(str))
23006#define rb_enc_str_new_lit(str,enc) rb_enc_str_new_static((str), rb_strlen_lit(str), (enc))
23007#define rb_str_new_literal(str) rb_str_new_lit(str)
23008#define rb_usascii_str_new_literal(str) rb_usascii_str_new_lit(str)
23009#define rb_utf8_str_new_literal(str) rb_utf8_str_new_lit(str)
23010#define rb_enc_str_new_literal(str,enc) rb_enc_str_new_lit(str, enc)
23011#pragma GCC visibility pop
23012#define RBIMPL_INTERN_STRUCT_H
23013#pragma GCC visibility push(default)
23014#pragma GCC visibility pop
23015#define RBIMPL_INTERN_THREAD_H
23016#pragma GCC visibility push(default)
23017#define RUBY_UBF_IO RBIMPL_CAST((rb_unblock_function_t *)-1)
23018#define RUBY_UBF_PROCESS RBIMPL_CAST((rb_unblock_function_t *)-1)
23019#pragma GCC visibility pop
23020#define RBIMPL_INTERN_TIME_H
23021#pragma GCC visibility push(default)
23022#pragma GCC visibility pop
23023#define RBIMPL_INTERN_VARIABLE_H
23024#pragma GCC visibility push(default)
23025#pragma GCC visibility pop
23026#define RUBY_VM 1
23027#define HAVE_NATIVETHREAD
23028#define InitVM(ext) {void InitVM_ ##ext(void);InitVM_ ##ext();}
23029#define rb_yield_values(argc,...) __extension__({ const int rb_yield_values_argc = (argc); const VALUE rb_yield_values_args[] = {__VA_ARGS__}; const int rb_yield_values_nargs = (int)(sizeof(rb_yield_values_args) / sizeof(VALUE)); rb_yield_values2( rb_varargs_argc_check(rb_yield_values_argc, rb_yield_values_nargs), rb_yield_values_nargs ? rb_yield_values_args : NULL); })
23030#define rb_funcall(recv,mid,argc,...) __extension__({ const int rb_funcall_argc = (argc); const VALUE rb_funcall_args[] = {__VA_ARGS__}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); rb_funcallv(recv, mid, rb_varargs_argc_check(rb_funcall_argc, rb_funcall_nargs), rb_funcall_nargs ? rb_funcall_args : NULL); })
23031#define RUBY_SUBST_H 1
23032#undef snprintf
23033#undef vsnprintf
23034#define snprintf ruby_snprintf
23035#define vsnprintf ruby_vsnprintf
23036#pragma GCC visibility pop
23037#define RUBY_VM_CORE_H
23038#define N_OR_RUBY_DEBUG(n) (((n) > 0) ? (n) : RUBY_DEBUG)
23039#define VM_CHECK_MODE N_OR_RUBY_DEBUG(0)
23040#define VMDEBUG 0
23041#define _SIGNAL_H
23042#define _BITS_SIGNUM_GENERIC_H 1
23043#define SIG_ERR ((__sighandler_t) -1)
23044#define SIG_DFL ((__sighandler_t) 0)
23045#define SIG_IGN ((__sighandler_t) 1)
23046#define SIG_HOLD ((__sighandler_t) 2)
23047#define SIGINT 2
23048#define SIGILL 4
23049#define SIGABRT 6
23050#define SIGFPE 8
23051#define SIGSEGV 11
23052#define SIGTERM 15
23053#define SIGHUP 1
23054#define SIGQUIT 3
23055#define SIGTRAP 5
23056#define SIGKILL 9
23057#define SIGPIPE 13
23058#define SIGALRM 14
23059#define SIGIO SIGPOLL
23060#define SIGIOT SIGABRT
23061#define SIGCLD SIGCHLD
23062#define _BITS_SIGNUM_ARCH_H 1
23063#define SIGSTKFLT 16
23064#define SIGPWR 30
23065#define SIGBUS 7
23066#define SIGSYS 31
23067#define SIGURG 23
23068#define SIGSTOP 19
23069#define SIGTSTP 20
23070#define SIGCONT 18
23071#define SIGCHLD 17
23072#define SIGTTIN 21
23073#define SIGTTOU 22
23074#define SIGPOLL 29
23075#define SIGXFSZ 25
23076#define SIGXCPU 24
23077#define SIGVTALRM 26
23078#define SIGPROF 27
23079#define SIGUSR1 10
23080#define SIGUSR2 12
23081#define SIGWINCH 28
23082#define SIGIO SIGPOLL
23083#define SIGIOT SIGABRT
23084#define SIGCLD SIGCHLD
23085#define __SIGRTMIN 32
23086#define __SIGRTMAX 64
23087#define _NSIG (__SIGRTMAX + 1)
23088#define __sig_atomic_t_defined 1
23089#define __siginfo_t_defined 1
23090#define __WORDSIZE 64
23091#define __WORDSIZE_TIME64_COMPAT32 1
23092#define __SYSCALL_WORDSIZE 64
23093#define ____sigval_t_defined
23094#define __SI_MAX_SIZE 128
23095#define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4)
23096#define _BITS_SIGINFO_ARCH_H 1
23097#define __SI_ALIGNMENT
23098#define __SI_BAND_TYPE long int
23099#define __SI_CLOCK_T __clock_t
23100#define __SI_ERRNO_THEN_CODE 1
23101#define __SI_HAVE_SIGSYS 1
23102#define __SI_SIGFAULT_ADDL
23103#define si_pid _sifields._kill.si_pid
23104#define si_uid _sifields._kill.si_uid
23105#define si_timerid _sifields._timer.si_tid
23106#define si_overrun _sifields._timer.si_overrun
23107#define si_status _sifields._sigchld.si_status
23108#define si_utime _sifields._sigchld.si_utime
23109#define si_stime _sifields._sigchld.si_stime
23110#define si_value _sifields._rt.si_sigval
23111#define si_int _sifields._rt.si_sigval.sival_int
23112#define si_ptr _sifields._rt.si_sigval.sival_ptr
23113#define si_addr _sifields._sigfault.si_addr
23114#define si_addr_lsb _sifields._sigfault.si_addr_lsb
23115#define si_lower _sifields._sigfault._bounds._addr_bnd._lower
23116#define si_upper _sifields._sigfault._bounds._addr_bnd._upper
23117#define si_pkey _sifields._sigfault._bounds._pkey
23118#define si_band _sifields._sigpoll.si_band
23119#define si_fd _sifields._sigpoll.si_fd
23120#define si_call_addr _sifields._sigsys._call_addr
23121#define si_syscall _sifields._sigsys._syscall
23122#define si_arch _sifields._sigsys._arch
23123#define _BITS_SIGINFO_CONSTS_H 1
23124#define __SI_ASYNCIO_AFTER_SIGIO 1
23125#define SI_ASYNCNL SI_ASYNCNL
23126#define SI_DETHREAD SI_DETHREAD
23127#define SI_TKILL SI_TKILL
23128#define SI_SIGIO SI_SIGIO
23129#define SI_ASYNCIO SI_ASYNCIO
23130#define SI_MESGQ SI_MESGQ
23131#define SI_TIMER SI_TIMER
23132#define SI_ASYNCIO SI_ASYNCIO
23133#define SI_QUEUE SI_QUEUE
23134#define SI_USER SI_USER
23135#define SI_KERNEL SI_KERNEL
23136#define ILL_ILLOPC ILL_ILLOPC
23137#define ILL_ILLOPN ILL_ILLOPN
23138#define ILL_ILLADR ILL_ILLADR
23139#define ILL_ILLTRP ILL_ILLTRP
23140#define ILL_PRVOPC ILL_PRVOPC
23141#define ILL_PRVREG ILL_PRVREG
23142#define ILL_COPROC ILL_COPROC
23143#define ILL_BADSTK ILL_BADSTK
23144#define ILL_BADIADDR ILL_BADIADDR
23145#define FPE_INTDIV FPE_INTDIV
23146#define FPE_INTOVF FPE_INTOVF
23147#define FPE_FLTDIV FPE_FLTDIV
23148#define FPE_FLTOVF FPE_FLTOVF
23149#define FPE_FLTUND FPE_FLTUND
23150#define FPE_FLTRES FPE_FLTRES
23151#define FPE_FLTINV FPE_FLTINV
23152#define FPE_FLTSUB FPE_FLTSUB
23153#define FPE_FLTUNK FPE_FLTUNK
23154#define FPE_CONDTRAP FPE_CONDTRAP
23155#define SEGV_MAPERR SEGV_MAPERR
23156#define SEGV_ACCERR SEGV_ACCERR
23157#define SEGV_BNDERR SEGV_BNDERR
23158#define SEGV_PKUERR SEGV_PKUERR
23159#define SEGV_ACCADI SEGV_ACCADI
23160#define SEGV_ADIDERR SEGV_ADIDERR
23161#define SEGV_ADIPERR SEGV_ADIPERR
23162#define SEGV_MTEAERR SEGV_MTEAERR
23163#define SEGV_MTESERR SEGV_MTESERR
23164#define BUS_ADRALN BUS_ADRALN
23165#define BUS_ADRERR BUS_ADRERR
23166#define BUS_OBJERR BUS_OBJERR
23167#define BUS_MCEERR_AR BUS_MCEERR_AR
23168#define BUS_MCEERR_AO BUS_MCEERR_AO
23169#define TRAP_BRKPT TRAP_BRKPT
23170#define TRAP_TRACE TRAP_TRACE
23171#define TRAP_BRANCH TRAP_BRANCH
23172#define TRAP_HWBKPT TRAP_HWBKPT
23173#define TRAP_UNK TRAP_UNK
23174#define CLD_EXITED CLD_EXITED
23175#define CLD_KILLED CLD_KILLED
23176#define CLD_DUMPED CLD_DUMPED
23177#define CLD_TRAPPED CLD_TRAPPED
23178#define CLD_STOPPED CLD_STOPPED
23179#define CLD_CONTINUED CLD_CONTINUED
23180#define POLL_IN POLL_IN
23181#define POLL_OUT POLL_OUT
23182#define POLL_MSG POLL_MSG
23183#define POLL_ERR POLL_ERR
23184#define POLL_PRI POLL_PRI
23185#define POLL_HUP POLL_HUP
23186#define _BITS_SIGINFO_CONSTS_ARCH_H 1
23187#define __sigval_t_defined
23188#define __sigevent_t_defined 1
23189#define __WORDSIZE 64
23190#define __WORDSIZE_TIME64_COMPAT32 1
23191#define __SYSCALL_WORDSIZE 64
23192#define __SIGEV_MAX_SIZE 64
23193#define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
23194#define sigev_notify_function _sigev_un._sigev_thread._function
23195#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
23196#define _BITS_SIGEVENT_CONSTS_H 1
23197#define SIGEV_SIGNAL SIGEV_SIGNAL
23198#define SIGEV_NONE SIGEV_NONE
23199#define SIGEV_THREAD SIGEV_THREAD
23200#define SIGEV_THREAD_ID SIGEV_THREAD_ID
23201#define sigmask(sig) __glibc_macro_warning ("sigmask is deprecated") ((int)(1u << ((sig) - 1)))
23202#define NSIG _NSIG
23203#define _BITS_SIGACTION_H 1
23204#define sa_handler __sigaction_handler.sa_handler
23205#define sa_sigaction __sigaction_handler.sa_sigaction
23206#define SA_NOCLDSTOP 1
23207#define SA_NOCLDWAIT 2
23208#define SA_SIGINFO 4
23209#define SA_ONSTACK 0x08000000
23210#define SA_RESTART 0x10000000
23211#define SA_NODEFER 0x40000000
23212#define SA_RESETHAND 0x80000000
23213#define SA_INTERRUPT 0x20000000
23214#define SA_NOMASK SA_NODEFER
23215#define SA_ONESHOT SA_RESETHAND
23216#define SA_STACK SA_ONSTACK
23217#define SIG_BLOCK 0
23218#define SIG_UNBLOCK 1
23219#define SIG_SETMASK 2
23220#define _BITS_SIGCONTEXT_H 1
23221#define FP_XSTATE_MAGIC1 0x46505853U
23222#define FP_XSTATE_MAGIC2 0x46505845U
23223#define FP_XSTATE_MAGIC2_SIZE sizeof (FP_XSTATE_MAGIC2)
23224#define __need_size_t
23225#undef __need_ptrdiff_t
23226#undef __need_size_t
23227#undef __need_wchar_t
23228#undef NULL
23229#define NULL ((void *)0)
23230#undef __need_NULL
23231#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
23232#define __stack_t_defined 1
23233#define __need_size_t
23234#undef __need_ptrdiff_t
23235#undef __need_size_t
23236#undef __need_wchar_t
23237#undef NULL
23238#define NULL ((void *)0)
23239#undef __need_NULL
23240#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
23241#define _SYS_UCONTEXT_H 1
23242#define __ctx(fld) fld
23243#define __NGREG 23
23244#define NGREG __NGREG
23245#define REG_R8 REG_R8
23246#define REG_R9 REG_R9
23247#define REG_R10 REG_R10
23248#define REG_R11 REG_R11
23249#define REG_R12 REG_R12
23250#define REG_R13 REG_R13
23251#define REG_R14 REG_R14
23252#define REG_R15 REG_R15
23253#define REG_RDI REG_RDI
23254#define REG_RSI REG_RSI
23255#define REG_RBP REG_RBP
23256#define REG_RBX REG_RBX
23257#define REG_RDX REG_RDX
23258#define REG_RAX REG_RAX
23259#define REG_RCX REG_RCX
23260#define REG_RSP REG_RSP
23261#define REG_RIP REG_RIP
23262#define REG_EFL REG_EFL
23263#define REG_CSGSFS REG_CSGSFS
23264#define REG_ERR REG_ERR
23265#define REG_TRAPNO REG_TRAPNO
23266#define REG_OLDMASK REG_OLDMASK
23267#define REG_CR2 REG_CR2
23268#undef __ctx
23269#define _BITS_SIGSTACK_H 1
23270#define MINSIGSTKSZ 2048
23271#define SIGSTKSZ 8192
23272#define _BITS_SS_FLAGS_H 1
23273#define SS_ONSTACK SS_ONSTACK
23274#define SS_DISABLE SS_DISABLE
23275#define __sigstack_defined 1
23276#define _BITS_SIGTHREAD_H 1
23277#define SIGRTMIN (__libc_current_sigrtmin ())
23278#define SIGRTMAX (__libc_current_sigrtmax ())
23279#define RUBY_TOPLEVEL_ASSERT_H
23280#undef assert
23281#define assert RUBY_ASSERT_NDEBUG
23282#define VM_ASSERT(expr) ((void)0)
23283#define VM_UNREACHABLE(func) UNREACHABLE
23284#define _SETJMP_H 1
23285#define _BITS_SETJMP_H 1
23286#define __WORDSIZE 64
23287#define __WORDSIZE_TIME64_COMPAT32 1
23288#define __SYSCALL_WORDSIZE 64
23289#define __jmp_buf_tag_defined 1
23290#define setjmp(env) _setjmp (env)
23291#define sigsetjmp(env,savemask) __sigsetjmp (env, savemask)
23292#define CCAN_LIST_H
23293#undef _ASSERT_H
23294#undef assert
23295#undef __ASSERT_VOID_CAST
23296#undef assert_perror
23297#define _ASSERT_H 1
23298#define __ASSERT_VOID_CAST (void)
23299#define assert(expr) (__ASSERT_VOID_CAST (0))
23300#define assert_perror(errnum) (__ASSERT_VOID_CAST (0))
23301#undef static_assert
23302#define static_assert _Static_assert
23303#define CCAN_STR_H
23304#define stringify(expr) stringify_1(expr)
23305#define stringify_1(expr) #expr
23306#define CCAN_CONTAINER_OF_H
23307#define CCAN_CHECK_TYPE_H
23308#define check_type(expr,type) ((typeof(expr) *)0 != (type *)0)
23309#define check_types_match(expr1,expr2) ((typeof(expr1) *)0 != (typeof(expr2) *)0)
23310#define container_of(member_ptr,containing_type,member) ((containing_type *) ((char *)(member_ptr) - container_off(containing_type, member)) + check_types_match(*(member_ptr), ((containing_type *)0)->member))
23311#define container_of_or_null(member_ptr,containing_type,member) ((containing_type *) container_of_or_null_(member_ptr, container_off(containing_type, member)) + check_types_match(*(member_ptr), ((containing_type *)0)->member))
23312#define container_off(containing_type,member) offsetof(containing_type, member)
23313#define container_of_var(member_ptr,container_var,member) container_of(member_ptr, typeof(*container_var), member)
23314#define container_off_var(var,member) container_off(typeof(*var), member)
23315#define LIST_LOC __FILE__ ":" stringify(__LINE__)
23316#define list_debug(h,loc) ((void)loc, h)
23317#define list_debug_node(n,loc) ((void)loc, n)
23318#define LIST_HEAD_INIT(name) { { &(name).n, &(name).n } }
23319#define LIST_HEAD(name) struct list_head name = LIST_HEAD_INIT(name)
23320#define list_add_after(h,p,n) list_add_after_(h, p, n, LIST_LOC)
23321#define list_add(h,n) list_add_(h, n, LIST_LOC)
23322#define list_add_before(h,p,n) list_add_before_(h, p, n, LIST_LOC)
23323#define list_add_tail(h,n) list_add_tail_(h, n, LIST_LOC)
23324#define list_empty(h) list_empty_(h, LIST_LOC)
23325#define list_empty_nodebug(h) list_empty(h)
23326#define list_del(n) list_del_(n, LIST_LOC)
23327#define list_del_init(n) list_del_init_(n, LIST_LOC)
23328#define list_swap(o,n) list_swap_(o, n, LIST_LOC)
23329#define list_entry(n,type,member) container_of(n, type, member)
23330#define list_top(h,type,member) ((type *)list_top_((h), list_off_(type, member)))
23331#define list_pop(h,type,member) ((type *)list_pop_((h), list_off_(type, member)))
23332#define list_tail(h,type,member) ((type *)list_tail_((h), list_off_(type, member)))
23333#define list_for_each(h,i,member) list_for_each_off(h, i, list_off_var_(i, member))
23334#define list_for_each_rev(h,i,member) list_for_each_rev_off(h, i, list_off_var_(i, member))
23335#define list_for_each_rev_safe(h,i,nxt,member) list_for_each_rev_safe_off(h, i, nxt, list_off_var_(i, member))
23336#define list_for_each_safe(h,i,nxt,member) list_for_each_safe_off(h, i, nxt, list_off_var_(i, member))
23337#define list_next(h,i,member) ((list_typeof(i))list_entry_or_null(list_debug(h, __FILE__ ":" stringify(__LINE__)), (i)->member.next, list_off_var_((i), member)))
23338#define list_prev(h,i,member) ((list_typeof(i))list_entry_or_null(list_debug(h, __FILE__ ":" stringify(__LINE__)), (i)->member.prev, list_off_var_((i), member)))
23339#define list_append_list(t,f) list_append_list_(t, f, __FILE__ ":" stringify(__LINE__))
23340#define list_prepend_list(t,f) list_prepend_list_(t, f, LIST_LOC)
23341#define list_for_each_off_dir_(h,i,off,dir) for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, (off)); list_node_from_off_((void *)i, (off)) != &(h)->n; i = list_node_to_off_(list_node_from_off_((void *)i, (off))->dir, (off)))
23342#define list_for_each_safe_off_dir_(h,i,nxt,off,dir) for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, (off)), nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, (off)); list_node_from_off_(i, (off)) != &(h)->n; i = nxt, nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, (off)))
23343#define list_for_each_off(h,i,off) list_for_each_off_dir_((h),(i),(off),next)
23344#define list_for_each_rev_off(h,i,off) list_for_each_off_dir_((h),(i),(off),prev)
23345#define list_for_each_safe_off(h,i,nxt,off) list_for_each_safe_off_dir_((h),(i),(nxt),(off),next)
23346#define list_for_each_rev_safe_off(h,i,nxt,off) list_for_each_safe_off_dir_((h),(i),(nxt),(off),prev)
23347#define list_entry_off(n,type,off) ((type *)list_node_from_off_((n), (off)))
23348#define list_head_off(h,type,off) ((type *)list_head_off((h), (off)))
23349#define list_tail_off(h,type,off) ((type *)list_tail_((h), (off)))
23350#define list_add_off(h,n,off) list_add((h), list_node_from_off_((n), (off)))
23351#define list_del_off(n,off) list_del(list_node_from_off_((n), (off)))
23352#define list_del_from_off(h,n,off) list_del_from(h, list_node_from_off_((n), (off)))
23353#define list_off_(type,member) (container_off(type, member) + check_type(((type *)0)->member, struct list_node))
23354#define list_off_var_(var,member) (container_off_var(var, member) + check_type(var->member, struct list_node))
23355#define list_typeof(var) typeof(var)
23356#define RUBY_ID_H
23357#define ID_STATIC_SYM RUBY_ID_STATIC_SYM
23358#define ID_SCOPE_SHIFT RUBY_ID_SCOPE_SHIFT
23359#define ID_SCOPE_MASK RUBY_ID_SCOPE_MASK
23360#define ID_LOCAL RUBY_ID_LOCAL
23361#define ID_INSTANCE RUBY_ID_INSTANCE
23362#define ID_GLOBAL RUBY_ID_GLOBAL
23363#define ID_ATTRSET RUBY_ID_ATTRSET
23364#define ID_CONST RUBY_ID_CONST
23365#define ID_CLASS RUBY_ID_CLASS
23366#define ID_JUNK RUBY_ID_JUNK
23367#define ID_INTERNAL RUBY_ID_INTERNAL
23368#define symIFUNC ID2SYM(idIFUNC)
23369#define symCFUNC ID2SYM(idCFUNC)
23370#define RUBY_TOKEN_DOT2 128
23371#define RUBY_TOKEN_DOT3 129
23372#define RUBY_TOKEN_BDOT2 130
23373#define RUBY_TOKEN_BDOT3 131
23374#define RUBY_TOKEN_UPLUS 132
23375#define RUBY_TOKEN_UMINUS 133
23376#define RUBY_TOKEN_POW 134
23377#define RUBY_TOKEN_CMP 135
23378#define RUBY_TOKEN_LSHFT 136
23379#define RUBY_TOKEN_RSHFT 137
23380#define RUBY_TOKEN_LEQ 138
23381#define RUBY_TOKEN_GEQ 139
23382#define RUBY_TOKEN_EQ 140
23383#define RUBY_TOKEN_EQQ 141
23384#define RUBY_TOKEN_NEQ 142
23385#define RUBY_TOKEN_MATCH 143
23386#define RUBY_TOKEN_NMATCH 144
23387#define RUBY_TOKEN_AREF 145
23388#define RUBY_TOKEN_ASET 146
23389#define RUBY_TOKEN_COLON2 147
23390#define RUBY_TOKEN_ANDOP 148
23391#define RUBY_TOKEN_OROP 149
23392#define RUBY_TOKEN_ANDDOT 150
23393#define RUBY_TOKEN(t) RUBY_TOKEN_ ##t
23394#define RUBY_TOKEN2ID_TYPE(tok,type) ((tok<<RUBY_ID_SCOPE_SHIFT)|type|RUBY_ID_STATIC_SYM)
23395#define TOKEN2LOCALID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_LOCAL)
23396#define TOKEN2INSTANCEID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_INSTANCE)
23397#define TOKEN2GLOBALID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_GLOBAL)
23398#define TOKEN2CONSTID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_CONST)
23399#define TOKEN2CLASSID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_CLASS)
23400#define TOKEN2ATTRSETID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_ATTRSET)
23401#define DEFINE_LOCALID_FROM_TOKEN(n) id ##n = TOKEN2LOCALID(t ##n)
23402#define DEFINE_INSTANCEID_FROM_TOKEN(n) id ##n = TOKEN2INSTANCEID(t ##n)
23403#define DEFINE_GLOBALID_FROM_TOKEN(n) id ##n = TOKEN2GLOBALID(t ##n)
23404#define DEFINE_CONSTID_FROM_TOKEN(n) id ##n = TOKEN2CONSTID(t ##n)
23405#define DEFINE_CLASSID_FROM_TOKEN(n) id ##n = TOKEN2CLASSID(t ##n)
23406#define DEFINE_ATTRSETID_FROM_TOKEN(n) id ##n = TOKEN2ATTRSETID(t ##n)
23407#define RUBY_INTERNAL_H 1
23408#define LIKELY(x) RB_LIKELY(x)
23409#define UNLIKELY(x) RB_UNLIKELY(x)
23410#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
23411#define roomof(x,y) (((x) + (y) - 1) / (y))
23412#define type_roomof(x,y) roomof(sizeof(x), sizeof(y))
23413#define ACCESS_ONCE(type,x) (*((volatile type *)&(x)))
23414#undef RARRAY_AREF
23415#undef RClass
23416#undef RCLASS_SUPER
23417#undef NEWOBJ_OF
23418#undef RB_NEWOBJ_OF
23419#undef RB_OBJ_WRITE
23420#undef RHASH_IFNONE
23421#undef RHASH_SIZE
23422#undef RHASH_TBL
23423#undef RHASH_EMPTY_P
23424#undef ROBJECT_IV_INDEX_TBL
23425#undef RSTRUCT_LEN
23426#undef RSTRUCT_PTR
23427#undef RSTRUCT_SET
23428#undef RSTRUCT_GET
23429#define rb_ary_new_from_args(...) rb_nonexistent_symbol(__VA_ARGS__)
23430#define rb_io_fptr_finalize(...) rb_nonexistent_symbol(__VA_ARGS__)
23431#define rb_fstring_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
23432#define rb_sym_intern_ascii_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
23433#define rb_funcallv(...) rb_nonexistent_symbol(__VA_ARGS__)
23434#define rb_method_basic_definition_p(...) rb_nonexistent_symbol(__VA_ARGS__)
23435#pragma GCC visibility push(default)
23436#pragma GCC visibility pop
23437#define rp(obj) rb_obj_info_dump_loc((VALUE)(obj), __FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING)
23438#define rp_m(msg,obj) do { fprintf(stderr, "%s", (msg)); rb_obj_info_dump((VALUE)obj); } while (0)
23439#define bp() ruby_debug_breakpoint()
23440#define INTERNAL_ARRAY_H
23441#define INTERNAL_STATIC_ASSERT_H
23442#define STATIC_ASSERT RBIMPL_STATIC_ASSERT
23443#define ARRAY_DEBUG (0+RUBY_DEBUG)
23444#define RARRAY_PTR_IN_USE_FLAG FL_USER14
23445#pragma GCC visibility push(default)
23446#pragma GCC visibility pop
23447#pragma GCC visibility push(default)
23448#pragma GCC visibility pop
23449#undef rb_ary_new_from_args
23450#define rb_ary_new_from_args(n,...) __extension__ ({ const VALUE args_to_new_ary[] = {__VA_ARGS__}; if (__builtin_constant_p(n)) { STATIC_ASSERT(rb_ary_new_from_args, numberof(args_to_new_ary) == (n)); } rb_ary_new_from_values(numberof(args_to_new_ary), args_to_new_ary); })
23451#undef RARRAY_AREF
23452#define INTERNAL_SERIAL_H
23453#define SERIALT2NUM ULL2NUM
23454#define PRI_SERIALT_PREFIX PRI_LL_PREFIX
23455#define SIZEOF_SERIAL_T SIZEOF_LONG_LONG
23456#define INTERNAL_VM_H
23457#undef rb_funcallv
23458#undef rb_method_basic_definition_p
23459#pragma GCC visibility push(default)
23460#pragma GCC visibility pop
23461#pragma GCC visibility push(default)
23462#pragma GCC visibility pop
23463#pragma GCC visibility push(default)
23464#pragma GCC visibility pop
23465#pragma GCC visibility push(default)
23466#pragma GCC visibility pop
23467#define RUBY_DTRACE_CREATE_HOOK(name,arg) RUBY_DTRACE_HOOK(name ##_CREATE, arg)
23468#define RUBY_DTRACE_HOOK(name,arg) do { if (UNLIKELY(RUBY_DTRACE_ ##name ##_ENABLED())) { int dtrace_line; const char *dtrace_file = rb_source_location_cstr(&dtrace_line); if (!dtrace_file) dtrace_file = ""; RUBY_DTRACE_ ##name(arg, dtrace_file, dtrace_line); } } while (0)
23469#define RUBY_METHOD_H 1
23470#define INTERNAL_IMEMO_H
23471#define INTERNAL_GC_H
23472#define INTERNAL_COMPILERS_H
23473#define MSC_VERSION_SINCE(_) RBIMPL_COMPILER_SINCE(MSVC, (_) / 100, (_) % 100, 0)
23474#define MSC_VERSION_BEFORE(_) RBIMPL_COMPILER_BEFORE(MSVC, (_) / 100, (_) % 100, 0)
23475#define __has_declspec_attribute(...) RBIMPL_HAS_DECLSPEC_ATTRIBUTE(__VA_ARGS__)
23476#define __has_feature(...) RBIMPL_HAS_FEATURE(__VA_ARGS__)
23477#define __has_extension(...) RBIMPL_HAS_EXTENSION(__VA_ARGS__)
23478#define __has_warning(...) RBIMPL_HAS_WARNING(__VA_ARGS__)
23479#define RB_OBJ_BUILTIN_TYPE(obj) rb_obj_builtin_type(obj)
23480#define OBJ_BUILTIN_TYPE(obj) RB_OBJ_BUILTIN_TYPE(obj)
23481#define rb_obj_builtin_type(obj) __extension__({ VALUE arg_obj = (obj); RB_SPECIAL_CONST_P(arg_obj) ? -1 : (int)RB_BUILTIN_TYPE(arg_obj); })
23482#define FLEX_ARY_LEN
23483#define BITFIELD(type,name,size) type name : size
23484#define RB_NEWOBJ_OF(var,T,c,f) T *(var) = (T *)(((f) & FL_WB_PROTECTED) ? rb_wb_protected_newobj_of((c), (f) & ~FL_WB_PROTECTED) : rb_wb_unprotected_newobj_of((c), (f)))
23485#define RB_EC_NEWOBJ_OF(ec,var,T,c,f) T *(var) = (T *)(((f) & FL_WB_PROTECTED) ? rb_ec_wb_protected_newobj_of((ec), (c), (f) & ~FL_WB_PROTECTED) : rb_wb_unprotected_newobj_of((c), (f)))
23486#define NEWOBJ_OF(var,T,c,f) RB_NEWOBJ_OF((var), T, (c), (f))
23487#define RB_OBJ_GC_FLAGS_MAX 6
23488#define INTERNAL_WARNINGS_H
23489#define COMPILER_WARNING_PUSH RBIMPL_WARNING_PUSH()
23490#define COMPILER_WARNING_POP RBIMPL_WARNING_POP()
23491#define COMPILER_WARNING_ERROR(flag) RBIMPL_WARNING_ERROR(flag)
23492#define COMPILER_WARNING_IGNORED(flag) RBIMPL_WARNING_IGNORED(flag)
23493#define UNALIGNED_MEMBER_ACCESS(expr) __extension__({ COMPILER_WARNING_PUSH; COMPILER_WARNING_IGNORED(-Waddress-of-packed-member); __typeof__(expr) unaligned_member_access_result = (expr); COMPILER_WARNING_POP; unaligned_member_access_result; })
23494#define UNALIGNED_MEMBER_PTR(ptr,mem) UNALIGNED_MEMBER_ACCESS(&(ptr)->mem)
23495#define RB_OBJ_WRITE(a,slot,b) rb_obj_write((VALUE)(a), UNALIGNED_MEMBER_ACCESS((VALUE *)(slot)), (VALUE)(b), __FILE__, __LINE__)
23496#pragma GCC visibility push(default)
23497#pragma GCC visibility pop
23498#pragma GCC visibility push(default)
23499#pragma GCC visibility pop
23500#define SIZED_REALLOC_N(x,y,z,w) REALLOC_N(x, y, z)
23501#define ruby_sized_xrealloc ruby_sized_xrealloc_inlined
23502#define ruby_sized_xrealloc2 ruby_sized_xrealloc2_inlined
23503#define ruby_sized_xfree ruby_sized_xfree_inlined
23504#define IMEMO_DEBUG 0
23505#define IMEMO_MASK 0x0f
23506#define IMEMO_FL_USHIFT (FL_USHIFT + 4)
23507#define IMEMO_FL_USER0 FL_USER4
23508#define IMEMO_FL_USER1 FL_USER5
23509#define IMEMO_FL_USER2 FL_USER6
23510#define IMEMO_FL_USER3 FL_USER7
23511#define IMEMO_FL_USER4 FL_USER8
23512#define IMEMO_FL_USER5 FL_USER9
23513#define THROW_DATA_CONSUMED IMEMO_FL_USER0
23514#define THROW_DATA_P(err) imemo_throw_data_p((VALUE)err)
23515#define MEMO_CAST(m) ((struct MEMO *)(m))
23516#define MEMO_NEW(a,b,c) ((struct MEMO *)rb_imemo_new(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
23517#define MEMO_FOR(type,value) ((type *)RARRAY_PTR(value))
23518#define NEW_MEMO_FOR(type,value) ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value))
23519#define NEW_PARTIAL_MEMO_FOR(type,value,member) ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), rb_ary_set_len((value), offsetof(type, member) / sizeof(VALUE)), MEMO_FOR(type, value))
23520#pragma GCC visibility push(default)
23521#pragma GCC visibility pop
23522#define IMEMO_TYPE_P(v,t) imemo_type_p((VALUE)v, t)
23523#pragma GCC diagnostic push
23524#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
23525#pragma GCC diagnostic pop
23526#pragma GCC diagnostic push
23527#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
23528#pragma GCC diagnostic pop
23529#define END_OF_ENUMERATION(key)
23530#define METHOD_ENTRY_VISI(me) (rb_method_visibility_t)(((me)->flags & (IMEMO_FL_USER0 | IMEMO_FL_USER1)) >> (IMEMO_FL_USHIFT+0))
23531#define METHOD_ENTRY_BASIC(me) (int) (((me)->flags & (IMEMO_FL_USER2 )) >> (IMEMO_FL_USHIFT+2))
23532#define METHOD_ENTRY_COMPLEMENTED(me) ((me)->flags & IMEMO_FL_USER3)
23533#define METHOD_ENTRY_COMPLEMENTED_SET(me) ((me)->flags |= IMEMO_FL_USER3)
23534#define METHOD_ENTRY_CACHED(me) ((me)->flags & IMEMO_FL_USER4)
23535#define METHOD_ENTRY_CACHED_SET(me) ((me)->flags |= IMEMO_FL_USER4)
23536#define METHOD_ENTRY_INVALIDATED(me) ((me)->flags & IMEMO_FL_USER5)
23537#define METHOD_ENTRY_INVALIDATED_SET(me) ((me)->flags |= IMEMO_FL_USER5)
23538#define METHOD_ENTRY_CACHEABLE(me) !(METHOD_ENTRY_VISI(me) == METHOD_VISI_PROTECTED)
23539#define VM_METHOD_TYPE_MINIMUM_BITS 4
23540#define rb_iseq_t rb_iseq_t
23541#define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF)
23542#define UNDEFINED_REFINED_METHOD_P(def) ((def)->type == VM_METHOD_TYPE_REFINED && UNDEFINED_METHOD_ENTRY_P((def)->body.refined.orig_me))
23543#pragma GCC visibility push(default)
23544#pragma GCC visibility pop
23545#define RUBY_NODE_H 1
23546#define RNODE(obj) ((struct RNode *)(obj))
23547#define NODE_FL_NEWLINE (((VALUE)1)<<7)
23548#define NODE_TYPESHIFT 8
23549#define NODE_TYPEMASK (((VALUE)0x7f)<<NODE_TYPESHIFT)
23550#define nd_type(n) ((int) (((n)->flags & NODE_TYPEMASK)>>NODE_TYPESHIFT))
23551#define nd_set_type(n,t) rb_node_set_type(n, t)
23552#define nd_init_type(n,t) (n)->flags=(((n)->flags&~NODE_TYPEMASK)|((((unsigned long)(t))<<NODE_TYPESHIFT)&NODE_TYPEMASK))
23553#define NODE_LSHIFT (NODE_TYPESHIFT+7)
23554#define NODE_LMASK (((SIGNED_VALUE)1<<(sizeof(VALUE)*CHAR_BIT-NODE_LSHIFT))-1)
23555#define nd_line(n) (int)(((SIGNED_VALUE)(n)->flags)>>NODE_LSHIFT)
23556#define nd_set_line(n,l) (n)->flags=(((n)->flags&~((VALUE)(-1)<<NODE_LSHIFT))|((VALUE)((l)&NODE_LMASK)<<NODE_LSHIFT))
23557#define nd_first_column(n) ((int)((n)->nd_loc.beg_pos.column))
23558#define nd_set_first_column(n,v) ((n)->nd_loc.beg_pos.column = (v))
23559#define nd_first_lineno(n) ((int)((n)->nd_loc.beg_pos.lineno))
23560#define nd_set_first_lineno(n,v) ((n)->nd_loc.beg_pos.lineno = (v))
23561#define nd_first_loc(n) ((n)->nd_loc.beg_pos)
23562#define nd_set_first_loc(n,v) (nd_first_loc(n) = (v))
23563#define nd_last_column(n) ((int)((n)->nd_loc.end_pos.column))
23564#define nd_set_last_column(n,v) ((n)->nd_loc.end_pos.column = (v))
23565#define nd_last_lineno(n) ((int)((n)->nd_loc.end_pos.lineno))
23566#define nd_set_last_lineno(n,v) ((n)->nd_loc.end_pos.lineno = (v))
23567#define nd_last_loc(n) ((n)->nd_loc.end_pos)
23568#define nd_set_last_loc(n,v) (nd_last_loc(n) = (v))
23569#define nd_node_id(n) ((n)->node_id)
23570#define nd_set_node_id(n,id) ((n)->node_id = (id))
23571#define nd_head u1.node
23572#define nd_alen u2.argc
23573#define nd_next u3.node
23574#define nd_cond u1.node
23575#define nd_body u2.node
23576#define nd_else u3.node
23577#define nd_resq u2.node
23578#define nd_ensr u3.node
23579#define nd_1st u1.node
23580#define nd_2nd u2.node
23581#define nd_stts u1.node
23582#define nd_entry u3.id
23583#define nd_vid u1.id
23584#define nd_cflag u2.id
23585#define nd_cval u3.value
23586#define nd_oid u1.id
23587#define nd_tbl u1.tbl
23588#define nd_var u1.node
23589#define nd_iter u3.node
23590#define nd_value u2.node
23591#define nd_aid u3.id
23592#define nd_lit u1.value
23593#define nd_rest u1.id
23594#define nd_opt u1.node
23595#define nd_pid u1.id
23596#define nd_plen u2.argc
23597#define nd_recv u1.node
23598#define nd_mid u2.id
23599#define nd_args u3.node
23600#define nd_ainfo u3.args
23601#define nd_defn u3.node
23602#define nd_cpath u1.node
23603#define nd_super u3.node
23604#define nd_beg u1.node
23605#define nd_end u2.node
23606#define nd_state u3.state
23607#define nd_rval u2.value
23608#define nd_nth u2.argc
23609#define nd_tag u1.id
23610#define nd_alias u1.id
23611#define nd_orig u2.id
23612#define nd_undef u2.node
23613#define nd_brace u2.argc
23614#define nd_pconst u1.node
23615#define nd_pkwargs u2.node
23616#define nd_pkwrestarg u3.node
23617#define nd_apinfo u3.apinfo
23618#define nd_fpinfo u3.fpinfo
23619#define NEW_NODE(t,a0,a1,a2,loc) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2),loc)
23620#define NEW_NODE_WITH_LOCALS(t,a1,a2,loc) node_newnode_with_locals(p, (t),(VALUE)(a1),(VALUE)(a2),loc)
23621#define NEW_DEFN(i,a,d,loc) NEW_NODE(NODE_DEFN,0,i,NEW_SCOPE(a,d,loc),loc)
23622#define NEW_DEFS(r,i,a,d,loc) NEW_NODE(NODE_DEFS,r,i,NEW_SCOPE(a,d,loc),loc)
23623#define NEW_SCOPE(a,b,loc) NEW_NODE_WITH_LOCALS(NODE_SCOPE,b,a,loc)
23624#define NEW_BLOCK(a,loc) NEW_NODE(NODE_BLOCK,a,0,0,loc)
23625#define NEW_IF(c,t,e,loc) NEW_NODE(NODE_IF,c,t,e,loc)
23626#define NEW_UNLESS(c,t,e,loc) NEW_NODE(NODE_UNLESS,c,t,e,loc)
23627#define NEW_CASE(h,b,loc) NEW_NODE(NODE_CASE,h,b,0,loc)
23628#define NEW_CASE2(b,loc) NEW_NODE(NODE_CASE2,0,b,0,loc)
23629#define NEW_CASE3(h,b,loc) NEW_NODE(NODE_CASE3,h,b,0,loc)
23630#define NEW_WHEN(c,t,e,loc) NEW_NODE(NODE_WHEN,c,t,e,loc)
23631#define NEW_IN(c,t,e,loc) NEW_NODE(NODE_IN,c,t,e,loc)
23632#define NEW_WHILE(c,b,n,loc) NEW_NODE(NODE_WHILE,c,b,n,loc)
23633#define NEW_UNTIL(c,b,n,loc) NEW_NODE(NODE_UNTIL,c,b,n,loc)
23634#define NEW_FOR(i,b,loc) NEW_NODE(NODE_FOR,0,b,i,loc)
23635#define NEW_FOR_MASGN(v,loc) NEW_NODE(NODE_FOR_MASGN,v,0,0,loc)
23636#define NEW_ITER(a,b,loc) NEW_NODE(NODE_ITER,0,NEW_SCOPE(a,b,loc),0,loc)
23637#define NEW_LAMBDA(a,b,loc) NEW_NODE(NODE_LAMBDA,0,NEW_SCOPE(a,b,loc),0,loc)
23638#define NEW_BREAK(s,loc) NEW_NODE(NODE_BREAK,s,0,0,loc)
23639#define NEW_NEXT(s,loc) NEW_NODE(NODE_NEXT,s,0,0,loc)
23640#define NEW_REDO(loc) NEW_NODE(NODE_REDO,0,0,0,loc)
23641#define NEW_RETRY(loc) NEW_NODE(NODE_RETRY,0,0,0,loc)
23642#define NEW_BEGIN(b,loc) NEW_NODE(NODE_BEGIN,0,b,0,loc)
23643#define NEW_RESCUE(b,res,e,loc) NEW_NODE(NODE_RESCUE,b,res,e,loc)
23644#define NEW_RESBODY(a,ex,n,loc) NEW_NODE(NODE_RESBODY,n,ex,a,loc)
23645#define NEW_ENSURE(b,en,loc) NEW_NODE(NODE_ENSURE,b,0,en,loc)
23646#define NEW_RETURN(s,loc) NEW_NODE(NODE_RETURN,s,0,0,loc)
23647#define NEW_YIELD(a,loc) NEW_NODE(NODE_YIELD,a,0,0,loc)
23648#define NEW_LIST(a,loc) NEW_NODE(NODE_LIST,a,1,0,loc)
23649#define NEW_ZLIST(loc) NEW_NODE(NODE_ZLIST,0,0,0,loc)
23650#define NEW_HASH(a,loc) NEW_NODE(NODE_HASH,a,0,0,loc)
23651#define NEW_MASGN(l,r,loc) NEW_NODE(NODE_MASGN,l,0,r,loc)
23652#define NEW_GASGN(v,val,loc) NEW_NODE(NODE_GASGN,v,val,v,loc)
23653#define NEW_LASGN(v,val,loc) NEW_NODE(NODE_LASGN,v,val,0,loc)
23654#define NEW_DASGN(v,val,loc) NEW_NODE(NODE_DASGN,v,val,0,loc)
23655#define NEW_DASGN_CURR(v,val,loc) NEW_NODE(NODE_DASGN_CURR,v,val,0,loc)
23656#define NEW_IASGN(v,val,loc) NEW_NODE(NODE_IASGN,v,val,0,loc)
23657#define NEW_CDECL(v,val,path,loc) NEW_NODE(NODE_CDECL,v,val,path,loc)
23658#define NEW_CVASGN(v,val,loc) NEW_NODE(NODE_CVASGN,v,val,0,loc)
23659#define NEW_OP_ASGN1(p,id,a,loc) NEW_NODE(NODE_OP_ASGN1,p,id,a,loc)
23660#define NEW_OP_ASGN2(r,t,i,o,val,loc) NEW_NODE(NODE_OP_ASGN2,r,val,NEW_OP_ASGN22(i,o,t,loc),loc)
23661#define NEW_OP_ASGN22(i,o,t,loc) NEW_NODE(NODE_OP_ASGN2,i,o,t,loc)
23662#define NEW_OP_ASGN_OR(i,val,loc) NEW_NODE(NODE_OP_ASGN_OR,i,val,0,loc)
23663#define NEW_OP_ASGN_AND(i,val,loc) NEW_NODE(NODE_OP_ASGN_AND,i,val,0,loc)
23664#define NEW_OP_CDECL(v,op,val,loc) NEW_NODE(NODE_OP_CDECL,v,val,op,loc)
23665#define NEW_GVAR(v,loc) NEW_NODE(NODE_GVAR,v,0,v,loc)
23666#define NEW_LVAR(v,loc) NEW_NODE(NODE_LVAR,v,0,0,loc)
23667#define NEW_DVAR(v,loc) NEW_NODE(NODE_DVAR,v,0,0,loc)
23668#define NEW_IVAR(v,loc) NEW_NODE(NODE_IVAR,v,0,0,loc)
23669#define NEW_CONST(v,loc) NEW_NODE(NODE_CONST,v,0,0,loc)
23670#define NEW_CVAR(v,loc) NEW_NODE(NODE_CVAR,v,0,0,loc)
23671#define NEW_NTH_REF(n,loc) NEW_NODE(NODE_NTH_REF,0,n,0,loc)
23672#define NEW_BACK_REF(n,loc) NEW_NODE(NODE_BACK_REF,0,n,0,loc)
23673#define NEW_MATCH(c,loc) NEW_NODE(NODE_MATCH,c,0,0,loc)
23674#define NEW_MATCH2(n1,n2,loc) NEW_NODE(NODE_MATCH2,n1,n2,0,loc)
23675#define NEW_MATCH3(r,n2,loc) NEW_NODE(NODE_MATCH3,r,n2,0,loc)
23676#define NEW_LIT(l,loc) NEW_NODE(NODE_LIT,l,0,0,loc)
23677#define NEW_STR(s,loc) NEW_NODE(NODE_STR,s,0,0,loc)
23678#define NEW_DSTR(s,loc) NEW_NODE(NODE_DSTR,s,1,0,loc)
23679#define NEW_XSTR(s,loc) NEW_NODE(NODE_XSTR,s,0,0,loc)
23680#define NEW_DXSTR(s,loc) NEW_NODE(NODE_DXSTR,s,0,0,loc)
23681#define NEW_DSYM(s,loc) NEW_NODE(NODE_DSYM,s,0,0,loc)
23682#define NEW_EVSTR(n,loc) NEW_NODE(NODE_EVSTR,0,(n),0,loc)
23683#define NEW_CALL(r,m,a,loc) NEW_NODE(NODE_CALL,r,m,a,loc)
23684#define NEW_OPCALL(r,m,a,loc) NEW_NODE(NODE_OPCALL,r,m,a,loc)
23685#define NEW_FCALL(m,a,loc) NEW_NODE(NODE_FCALL,0,m,a,loc)
23686#define NEW_VCALL(m,loc) NEW_NODE(NODE_VCALL,0,m,0,loc)
23687#define NEW_SUPER(a,loc) NEW_NODE(NODE_SUPER,0,0,a,loc)
23688#define NEW_ZSUPER(loc) NEW_NODE(NODE_ZSUPER,0,0,0,loc)
23689#define NEW_ARGS_AUX(r,b,loc) NEW_NODE(NODE_ARGS_AUX,r,b,0,loc)
23690#define NEW_OPT_ARG(i,v,loc) NEW_NODE(NODE_OPT_ARG,i,v,0,loc)
23691#define NEW_KW_ARG(i,v,loc) NEW_NODE(NODE_KW_ARG,i,v,0,loc)
23692#define NEW_POSTARG(i,v,loc) NEW_NODE(NODE_POSTARG,i,v,0,loc)
23693#define NEW_ARGSCAT(a,b,loc) NEW_NODE(NODE_ARGSCAT,a,b,0,loc)
23694#define NEW_ARGSPUSH(a,b,loc) NEW_NODE(NODE_ARGSPUSH,a,b,0,loc)
23695#define NEW_SPLAT(a,loc) NEW_NODE(NODE_SPLAT,a,0,0,loc)
23696#define NEW_BLOCK_PASS(b,loc) NEW_NODE(NODE_BLOCK_PASS,0,b,0,loc)
23697#define NEW_ALIAS(n,o,loc) NEW_NODE(NODE_ALIAS,n,o,0,loc)
23698#define NEW_VALIAS(n,o,loc) NEW_NODE(NODE_VALIAS,n,o,0,loc)
23699#define NEW_UNDEF(i,loc) NEW_NODE(NODE_UNDEF,0,i,0,loc)
23700#define NEW_CLASS(n,b,s,loc) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(0,b,loc),(s),loc)
23701#define NEW_SCLASS(r,b,loc) NEW_NODE(NODE_SCLASS,r,NEW_SCOPE(0,b,loc),0,loc)
23702#define NEW_MODULE(n,b,loc) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(0,b,loc),0,loc)
23703#define NEW_COLON2(c,i,loc) NEW_NODE(NODE_COLON2,c,i,0,loc)
23704#define NEW_COLON3(i,loc) NEW_NODE(NODE_COLON3,0,i,0,loc)
23705#define NEW_DOT2(b,e,loc) NEW_NODE(NODE_DOT2,b,e,0,loc)
23706#define NEW_DOT3(b,e,loc) NEW_NODE(NODE_DOT3,b,e,0,loc)
23707#define NEW_SELF(loc) NEW_NODE(NODE_SELF,0,0,1,loc)
23708#define NEW_NIL(loc) NEW_NODE(NODE_NIL,0,0,0,loc)
23709#define NEW_TRUE(loc) NEW_NODE(NODE_TRUE,0,0,0,loc)
23710#define NEW_FALSE(loc) NEW_NODE(NODE_FALSE,0,0,0,loc)
23711#define NEW_ERRINFO(loc) NEW_NODE(NODE_ERRINFO,0,0,0,loc)
23712#define NEW_DEFINED(e,loc) NEW_NODE(NODE_DEFINED,e,0,0,loc)
23713#define NEW_PREEXE(b,loc) NEW_SCOPE(b,loc)
23714#define NEW_POSTEXE(b,loc) NEW_NODE(NODE_POSTEXE,0,b,0,loc)
23715#define NEW_ATTRASGN(r,m,a,loc) NEW_NODE(NODE_ATTRASGN,r,m,a,loc)
23716#define NODE_SPECIAL_REQUIRED_KEYWORD ((NODE *)-1)
23717#define NODE_REQUIRED_KEYWORD_P(node) ((node)->nd_value == NODE_SPECIAL_REQUIRED_KEYWORD)
23718#define NODE_SPECIAL_NO_NAME_REST ((NODE *)-1)
23719#define NODE_NAMED_REST_P(node) ((node) != NODE_SPECIAL_NO_NAME_REST)
23720#define NODE_SPECIAL_EXCESSIVE_COMMA ((ID)1)
23721#define NODE_SPECIAL_NO_REST_KEYWORD ((NODE *)-1)
23722#pragma GCC visibility push(default)
23723#pragma GCC visibility pop
23724#define RUBY_ATOMIC_H
23725#define RUBY_ATOMIC_FETCH_ADD(var,val) __atomic_fetch_add(&(var), (val), __ATOMIC_SEQ_CST)
23726#define RUBY_ATOMIC_FETCH_SUB(var,val) __atomic_fetch_sub(&(var), (val), __ATOMIC_SEQ_CST)
23727#define RUBY_ATOMIC_OR(var,val) __atomic_fetch_or(&(var), (val), __ATOMIC_SEQ_CST)
23728#define RUBY_ATOMIC_EXCHANGE(var,val) __atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST)
23729#define RUBY_ATOMIC_CAS(var,oldval,newval) RB_GNUC_EXTENSION_BLOCK( __typeof__(var) oldvaldup = (oldval); __atomic_compare_exchange_n(&(var), &oldvaldup, (newval), 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); oldvaldup )
23730#define RUBY_ATOMIC_GENERIC_MACRO 1
23731#define RUBY_ATOMIC_SET(var,val) (void)RUBY_ATOMIC_EXCHANGE(var, val)
23732#define RUBY_ATOMIC_ADD(var,val) (void)RUBY_ATOMIC_FETCH_ADD(var, val)
23733#define RUBY_ATOMIC_SUB(var,val) (void)RUBY_ATOMIC_FETCH_SUB(var, val)
23734#define RUBY_ATOMIC_INC(var) RUBY_ATOMIC_ADD(var, 1)
23735#define RUBY_ATOMIC_DEC(var) RUBY_ATOMIC_SUB(var, 1)
23736#define RUBY_ATOMIC_SIZE_INC(var) RUBY_ATOMIC_INC(var)
23737#define RUBY_ATOMIC_SIZE_DEC(var) RUBY_ATOMIC_DEC(var)
23738#define RUBY_ATOMIC_SIZE_EXCHANGE(var,val) RUBY_ATOMIC_EXCHANGE(var, val)
23739#define RUBY_ATOMIC_SIZE_CAS(var,oldval,val) RUBY_ATOMIC_CAS(var, oldval, val)
23740#define RUBY_ATOMIC_SIZE_ADD(var,val) RUBY_ATOMIC_ADD(var, val)
23741#define RUBY_ATOMIC_SIZE_SUB(var,val) RUBY_ATOMIC_SUB(var, val)
23742#define RUBY_ATOMIC_PTR_EXCHANGE(var,val) RUBY_ATOMIC_EXCHANGE(var, val)
23743#define RUBY_ATOMIC_PTR_CAS(var,oldval,newval) RUBY_ATOMIC_CAS(var, oldval, newval)
23744#define RUBY_ATOMIC_VALUE_EXCHANGE(var,val) RUBY_ATOMIC_EXCHANGE(var, val)
23745#define RUBY_ATOMIC_VALUE_CAS(var,oldval,val) RUBY_ATOMIC_CAS(var, oldval, val)
23746#define ATOMIC_ADD(var,val) RUBY_ATOMIC_ADD(var, val)
23747#define ATOMIC_CAS(var,oldval,newval) RUBY_ATOMIC_CAS(var, oldval, newval)
23748#define ATOMIC_DEC(var) RUBY_ATOMIC_DEC(var)
23749#define ATOMIC_EXCHANGE(var,val) RUBY_ATOMIC_EXCHANGE(var, val)
23750#define ATOMIC_FETCH_ADD(var,val) RUBY_ATOMIC_FETCH_ADD(var, val)
23751#define ATOMIC_FETCH_SUB(var,val) RUBY_ATOMIC_FETCH_SUB(var, val)
23752#define ATOMIC_INC(var) RUBY_ATOMIC_INC(var)
23753#define ATOMIC_OR(var,val) RUBY_ATOMIC_OR(var, val)
23754#define ATOMIC_PTR_CAS(var,oldval,newval) RUBY_ATOMIC_PTR_CAS(var, oldval, newval)
23755#define ATOMIC_PTR_EXCHANGE(var,val) RUBY_ATOMIC_PTR_EXCHANGE(var, val)
23756#define ATOMIC_SET(var,val) RUBY_ATOMIC_SET(var, val)
23757#define ATOMIC_SIZE_ADD(var,val) RUBY_ATOMIC_SIZE_ADD(var, val)
23758#define ATOMIC_SIZE_CAS(var,oldval,newval) RUBY_ATOMIC_SIZE_CAS(var, oldval, newval)
23759#define ATOMIC_SIZE_DEC(var) RUBY_ATOMIC_SIZE_DEC(var)
23760#define ATOMIC_SIZE_EXCHANGE(var,val) RUBY_ATOMIC_SIZE_EXCHANGE(var, val)
23761#define ATOMIC_SIZE_INC(var) RUBY_ATOMIC_SIZE_INC(var)
23762#define ATOMIC_SIZE_SUB(var,val) RUBY_ATOMIC_SIZE_SUB(var, val)
23763#define ATOMIC_SUB(var,val) RUBY_ATOMIC_SUB(var, val)
23764#define ATOMIC_VALUE_CAS(var,oldval,val) RUBY_ATOMIC_VALUE_CAS(var, oldval, val)
23765#define ATOMIC_VALUE_EXCHANGE(var,val) RUBY_ATOMIC_VALUE_EXCHANGE(var, val)
23766#define RUBY_VM_OPTS_H
23767#define OPT_TAILCALL_OPTIMIZATION 0
23768#define OPT_PEEPHOLE_OPTIMIZATION 1
23769#define OPT_SPECIALISED_INSTRUCTION 1
23770#define OPT_INLINE_CONST_CACHE 1
23771#define OPT_FROZEN_STRING_LITERAL 0
23772#define OPT_DEBUG_FROZEN_STRING_LITERAL 0
23773#define OPT_THREADED_CODE 0
23774#define OPT_DIRECT_THREADED_CODE (OPT_THREADED_CODE == 0)
23775#define OPT_TOKEN_THREADED_CODE (OPT_THREADED_CODE == 1)
23776#define OPT_CALL_THREADED_CODE (OPT_THREADED_CODE == 2)
23777#define OPT_CHECKED_RUN 1
23778#define OPT_INLINE_METHOD_CACHE 1
23779#define OPT_GLOBAL_METHOD_CACHE 1
23780#define OPT_BLOCKINLINING 0
23781#define OPT_IC_FOR_IVAR 1
23782#define OPT_OPERANDS_UNIFICATION 1
23783#define OPT_INSTRUCTIONS_UNIFICATION 0
23784#define OPT_UNIFY_ALL_COMBINATION 0
23785#define OPT_STACK_CACHING 0
23786#define OPT_SUPPORT_JOKE 0
23787#define OPT_SUPPORT_CALL_C_FUNCTION 0
23788#define VM_COLLECT_USAGE_DETAILS 0
23789#define RUBY_THREAD_NATIVE_H 1
23790#define _PTHREAD_H 1
23791#define _SCHED_H 1
23792#define __need_size_t
23793#define __need_NULL
23794#undef __need_ptrdiff_t
23795#undef __need_size_t
23796#undef __need_wchar_t
23797#undef NULL
23798#define NULL ((void *)0)
23799#undef __need_NULL
23800#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
23801#define _BITS_SCHED_H 1
23802#define SCHED_OTHER 0
23803#define SCHED_FIFO 1
23804#define SCHED_RR 2
23805#define SCHED_BATCH 3
23806#define SCHED_ISO 4
23807#define SCHED_IDLE 5
23808#define SCHED_DEADLINE 6
23809#define SCHED_RESET_ON_FORK 0x40000000
23810#define CSIGNAL 0x000000ff
23811#define CLONE_VM 0x00000100
23812#define CLONE_FS 0x00000200
23813#define CLONE_FILES 0x00000400
23814#define CLONE_SIGHAND 0x00000800
23815#define CLONE_PIDFD 0x00001000
23816#define CLONE_PTRACE 0x00002000
23817#define CLONE_VFORK 0x00004000
23818#define CLONE_PARENT 0x00008000
23819#define CLONE_THREAD 0x00010000
23820#define CLONE_NEWNS 0x00020000
23821#define CLONE_SYSVSEM 0x00040000
23822#define CLONE_SETTLS 0x00080000
23823#define CLONE_PARENT_SETTID 0x00100000
23824#define CLONE_CHILD_CLEARTID 0x00200000
23825#define CLONE_DETACHED 0x00400000
23826#define CLONE_UNTRACED 0x00800000
23827#define CLONE_CHILD_SETTID 0x01000000
23828#define CLONE_NEWCGROUP 0x02000000
23829#define CLONE_NEWUTS 0x04000000
23830#define CLONE_NEWIPC 0x08000000
23831#define CLONE_NEWUSER 0x10000000
23832#define CLONE_NEWPID 0x20000000
23833#define CLONE_NEWNET 0x40000000
23834#define CLONE_IO 0x80000000
23835#define _BITS_TYPES_STRUCT_SCHED_PARAM 1
23836#define _BITS_CPU_SET_H 1
23837#define __CPU_SETSIZE 1024
23838#define __NCPUBITS (8 * sizeof (__cpu_mask))
23839#define __CPUELT(cpu) ((cpu) / __NCPUBITS)
23840#define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS))
23841#define __CPU_ZERO_S(setsize,cpusetp) do __builtin_memset (cpusetp, '\0', setsize); while (0)
23842#define __CPU_SET_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] |= __CPUMASK (__cpu)) : 0; }))
23843#define __CPU_CLR_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] &= ~__CPUMASK (__cpu)) : 0; }))
23844#define __CPU_ISSET_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] & __CPUMASK (__cpu))) != 0 : 0; }))
23845#define __CPU_COUNT_S(setsize,cpusetp) __sched_cpucount (setsize, cpusetp)
23846#define __CPU_EQUAL_S(setsize,cpusetp1,cpusetp2) (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
23847#define __CPU_OP_S(setsize,destset,srcset1,srcset2,op) (__extension__ ({ cpu_set_t *__dest = (destset); const __cpu_mask *__arr1 = (srcset1)->__bits; const __cpu_mask *__arr2 = (srcset2)->__bits; size_t __imax = (setsize) / sizeof (__cpu_mask); size_t __i; for (__i = 0; __i < __imax; ++__i) ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; __dest; }))
23848#define __CPU_ALLOC_SIZE(count) ((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask))
23849#define __CPU_ALLOC(count) __sched_cpualloc (count)
23850#define __CPU_FREE(cpuset) __sched_cpufree (cpuset)
23851#define sched_priority sched_priority
23852#define __sched_priority sched_priority
23853#define CPU_SETSIZE __CPU_SETSIZE
23854#define CPU_SET(cpu,cpusetp) __CPU_SET_S (cpu, sizeof (cpu_set_t), cpusetp)
23855#define CPU_CLR(cpu,cpusetp) __CPU_CLR_S (cpu, sizeof (cpu_set_t), cpusetp)
23856#define CPU_ISSET(cpu,cpusetp) __CPU_ISSET_S (cpu, sizeof (cpu_set_t), cpusetp)
23857#define CPU_ZERO(cpusetp) __CPU_ZERO_S (sizeof (cpu_set_t), cpusetp)
23858#define CPU_COUNT(cpusetp) __CPU_COUNT_S (sizeof (cpu_set_t), cpusetp)
23859#define CPU_SET_S(cpu,setsize,cpusetp) __CPU_SET_S (cpu, setsize, cpusetp)
23860#define CPU_CLR_S(cpu,setsize,cpusetp) __CPU_CLR_S (cpu, setsize, cpusetp)
23861#define CPU_ISSET_S(cpu,setsize,cpusetp) __CPU_ISSET_S (cpu, setsize, cpusetp)
23862#define CPU_ZERO_S(setsize,cpusetp) __CPU_ZERO_S (setsize, cpusetp)
23863#define CPU_COUNT_S(setsize,cpusetp) __CPU_COUNT_S (setsize, cpusetp)
23864#define CPU_EQUAL(cpusetp1,cpusetp2) __CPU_EQUAL_S (sizeof (cpu_set_t), cpusetp1, cpusetp2)
23865#define CPU_EQUAL_S(setsize,cpusetp1,cpusetp2) __CPU_EQUAL_S (setsize, cpusetp1, cpusetp2)
23866#define CPU_AND(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, &)
23867#define CPU_OR(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, |)
23868#define CPU_XOR(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, ^)
23869#define CPU_AND_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, &)
23870#define CPU_OR_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, |)
23871#define CPU_XOR_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, ^)
23872#define CPU_ALLOC_SIZE(count) __CPU_ALLOC_SIZE (count)
23873#define CPU_ALLOC(count) __CPU_ALLOC (count)
23874#define CPU_FREE(cpuset) __CPU_FREE (cpuset)
23875#define __WORDSIZE 64
23876#define __WORDSIZE_TIME64_COMPAT32 1
23877#define __SYSCALL_WORDSIZE 64
23878#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
23879#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
23880#define PTHREAD_MUTEX_INITIALIZER { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_TIMED_NP) } }
23881#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_RECURSIVE_NP) } }
23882#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ERRORCHECK_NP) } }
23883#define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ADAPTIVE_NP) } }
23884#define PTHREAD_RWLOCK_INITIALIZER { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_DEFAULT_NP) } }
23885#define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) } }
23886#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED
23887#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED
23888#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM
23889#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS
23890#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE
23891#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED
23892#define PTHREAD_COND_INITIALIZER { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } }
23893#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE
23894#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE
23895#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED
23896#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS
23897#define PTHREAD_CANCELED ((void *) -1)
23898#define PTHREAD_ONCE_INIT 0
23899#define PTHREAD_BARRIER_SERIAL_THREAD -1
23900#define PTHREAD_ATTR_NO_SIGMASK_NP (-1)
23901#define __cleanup_fct_attribute
23902#define pthread_cleanup_push(routine,arg) do { __pthread_unwind_buf_t __cancel_buf; void (*__cancel_routine) (void *) = (routine); void *__cancel_arg = (arg); int __not_first_call = __sigsetjmp_cancel (__cancel_buf.__cancel_jmp_buf, 0); if (__glibc_unlikely (__not_first_call)) { __cancel_routine (__cancel_arg); __pthread_unwind_next (&__cancel_buf); } __pthread_register_cancel (&__cancel_buf); do {
23903#define pthread_cleanup_pop(execute) do { } while (0); } while (0); __pthread_unregister_cancel (&__cancel_buf); if (execute) __cancel_routine (__cancel_arg); } while (0)
23904#define pthread_cleanup_push_defer_np(routine,arg) do { __pthread_unwind_buf_t __cancel_buf; void (*__cancel_routine) (void *) = (routine); void *__cancel_arg = (arg); int __not_first_call = __sigsetjmp_cancel (__cancel_buf.__cancel_jmp_buf, 0); if (__glibc_unlikely (__not_first_call)) { __cancel_routine (__cancel_arg); __pthread_unwind_next (&__cancel_buf); } __pthread_register_cancel_defer (&__cancel_buf); do {
23905#define pthread_cleanup_pop_restore_np(execute) do { } while (0); } while (0); __pthread_unregister_cancel_restore (&__cancel_buf); if (execute) __cancel_routine (__cancel_arg); } while (0)
23906#pragma GCC visibility push(default)
23907#pragma GCC visibility pop
23908#define RUBY_THREAD_PTHREAD_H
23909#define RB_NATIVETHREAD_LOCK_INIT PTHREAD_MUTEX_INITIALIZER
23910#define RB_NATIVETHREAD_COND_INIT PTHREAD_COND_INITIALIZER
23911#undef except
23912#undef try
23913#undef leave
23914#undef finally
23915#define RB_THREAD_LOCAL_SPECIFIER __thread
23916#pragma GCC visibility push(default)
23917#pragma GCC visibility pop
23918#define RUBY_VM_THREAD_MODEL 2
23919#define VM_INSN_INFO_TABLE_IMPL 2
23920#define RUBY_NSIG NSIG
23921#define RUBY_SIGCHLD (SIGCLD)
23922#define SIGCHLD_LOSSY (0)
23923#define WAITPID_USE_SIGCHLD (RUBY_SIGCHLD || SIGCHLD_LOSSY)
23924#define USE_SIGALTSTACK
23925#define RB_ALTSTACK_INIT(var,altstack) var = rb_register_sigaltstack(altstack)
23926#define RB_ALTSTACK_FREE(var) free(var)
23927#define RB_ALTSTACK(var) var
23928#define TAG_NONE RUBY_TAG_NONE
23929#define TAG_RETURN RUBY_TAG_RETURN
23930#define TAG_BREAK RUBY_TAG_BREAK
23931#define TAG_NEXT RUBY_TAG_NEXT
23932#define TAG_RETRY RUBY_TAG_RETRY
23933#define TAG_REDO RUBY_TAG_REDO
23934#define TAG_RAISE RUBY_TAG_RAISE
23935#define TAG_THROW RUBY_TAG_THROW
23936#define TAG_FATAL RUBY_TAG_FATAL
23937#define TAG_MASK RUBY_TAG_MASK
23938#define CoreDataFromValue(obj,type) (type*)DATA_PTR(obj)
23939#define GetCoreDataFromValue(obj,type,ptr) ((ptr) = CoreDataFromValue((obj), type))
23940#define PATHOBJ_PATH 0
23941#define PATHOBJ_REALPATH 1
23942#define USE_LAZY_LOAD 0
23943#define GetVMPtr(obj,ptr) GetCoreDataFromValue((obj), rb_vm_t, (ptr))
23944#define VM_GLOBAL_CC_CACHE_TABLE_SIZE 1023
23945#define RUBY_VM_SIZE_ALIGN 4096
23946#define RUBY_VM_THREAD_VM_STACK_SIZE ( 128 * 1024 * sizeof(VALUE))
23947#define RUBY_VM_THREAD_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE))
23948#define RUBY_VM_THREAD_MACHINE_STACK_SIZE ( 128 * 1024 * sizeof(VALUE))
23949#define RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE))
23950#define RUBY_VM_FIBER_VM_STACK_SIZE ( 16 * 1024 * sizeof(VALUE))
23951#define RUBY_VM_FIBER_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE))
23952#define RUBY_VM_FIBER_MACHINE_STACK_SIZE ( 64 * 1024 * sizeof(VALUE))
23953#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE))
23954#define INTEGER_REDEFINED_OP_FLAG (1 << 0)
23955#define FLOAT_REDEFINED_OP_FLAG (1 << 1)
23956#define STRING_REDEFINED_OP_FLAG (1 << 2)
23957#define ARRAY_REDEFINED_OP_FLAG (1 << 3)
23958#define HASH_REDEFINED_OP_FLAG (1 << 4)
23959#define SYMBOL_REDEFINED_OP_FLAG (1 << 6)
23960#define TIME_REDEFINED_OP_FLAG (1 << 7)
23961#define REGEXP_REDEFINED_OP_FLAG (1 << 8)
23962#define NIL_REDEFINED_OP_FLAG (1 << 9)
23963#define TRUE_REDEFINED_OP_FLAG (1 << 10)
23964#define FALSE_REDEFINED_OP_FLAG (1 << 11)
23965#define PROC_REDEFINED_OP_FLAG (1 << 12)
23966#define BASIC_OP_UNREDEFINED_P(op,klass) (LIKELY((GET_VM()->redefined_flag[(op)]&(klass)) == 0))
23967#define VM_DEBUG_BP_CHECK 0
23968#define VM_DEBUG_VERIFY_METHOD_CACHE (VMDEBUG != 0)
23969#define rb_execution_context_t rb_execution_context_t
23970#define VM_CORE_H_EC_DEFINED 1
23971#define VM_DEFINECLASS_TYPE(x) ((rb_vm_defineclass_type_t)(x) & VM_DEFINECLASS_TYPE_MASK)
23972#define VM_DEFINECLASS_FLAG_SCOPED 0x08
23973#define VM_DEFINECLASS_FLAG_HAS_SUPERCLASS 0x10
23974#define VM_DEFINECLASS_SCOPED_P(x) ((x) & VM_DEFINECLASS_FLAG_SCOPED)
23975#define VM_DEFINECLASS_HAS_SUPERCLASS_P(x) ((x) & VM_DEFINECLASS_FLAG_HAS_SUPERCLASS)
23976#pragma GCC visibility push(default)
23977#pragma GCC visibility pop
23978#define GetProcPtr(obj,ptr) GetCoreDataFromValue((obj), rb_proc_t, (ptr))
23979#pragma GCC visibility push(default)
23980#pragma GCC visibility pop
23981#define GetBindingPtr(obj,ptr) GetCoreDataFromValue((obj), rb_binding_t, (ptr))
23982#define VM_CHECKMATCH_TYPE_MASK 0x03
23983#define VM_CHECKMATCH_ARRAY 0x04
23984#define FUNC_FASTCALL(x) x
23985#define VM_TAGGED_PTR_SET(p,tag) ((VALUE)(p) | (tag))
23986#define VM_TAGGED_PTR_REF(v,mask) ((void *)((v) & ~mask))
23987#define GC_GUARDED_PTR(p) VM_TAGGED_PTR_SET((p), 0x01)
23988#define GC_GUARDED_PTR_REF(p) VM_TAGGED_PTR_REF((p), 0x03)
23989#define GC_GUARDED_PTR_P(p) (((VALUE)(p)) & 0x01)
23990#define VM_ENV_DATA_SIZE ( 3)
23991#define VM_ENV_DATA_INDEX_ME_CREF (-2)
23992#define VM_ENV_DATA_INDEX_SPECVAL (-1)
23993#define VM_ENV_DATA_INDEX_FLAGS ( 0)
23994#define VM_ENV_DATA_INDEX_ENV ( 1)
23995#define VM_ENV_INDEX_LAST_LVAR (-VM_ENV_DATA_SIZE)
23996#define RUBYVM_CFUNC_FRAME_P(cfp) (VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CFUNC)
23997#define VM_GUARDED_PREV_EP(ep) GC_GUARDED_PTR(ep)
23998#define VM_BLOCK_HANDLER_NONE 0
23999#define RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp) ((cfp)+1)
24000#define RUBY_VM_NEXT_CONTROL_FRAME(cfp) ((cfp)-1)
24001#define RUBY_VM_VALID_CONTROL_FRAME_P(cfp,ecfp) ((void *)(ecfp) > (void *)(cfp))
24002#define SDR() rb_vmdebug_stack_dump_raw(GET_EC(), GET_EC()->cfp)
24003#define SDR2(cfp) rb_vmdebug_stack_dump_raw(GET_EC(), (cfp))
24004#pragma GCC visibility push(default)
24005#pragma GCC visibility pop
24006#define rb_vm_register_special_exception(sp,e,m) rb_vm_register_special_exception_str(sp, e, rb_usascii_str_new_static((m), (long)rb_strlen_lit(m)))
24007#define sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack]
24008#define CHECK_VM_STACK_OVERFLOW0(cfp,sp,margin) do { STATIC_ASSERT(sizeof_sp, sizeof(*(sp)) == sizeof(VALUE)); STATIC_ASSERT(sizeof_cfp, sizeof(*(cfp)) == sizeof(rb_control_frame_t)); const struct rb_control_frame_struct *bound = (void *)&(sp)[(margin)]; if (UNLIKELY((cfp) <= &bound[1])) { vm_stackoverflow(); } } while (0)
24009#define CHECK_VM_STACK_OVERFLOW(cfp,margin) CHECK_VM_STACK_OVERFLOW0((cfp), (cfp)->sp, (margin))
24010#pragma GCC visibility push(default)
24011#pragma GCC visibility pop
24012#define GET_VM() rb_current_vm()
24013#define GET_RACTOR() rb_current_ractor()
24014#define GET_THREAD() rb_current_thread()
24015#define GET_EC() rb_current_execution_context(true)
24016#define RUBY_VM_SET_TIMER_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TIMER_INTERRUPT_MASK)
24017#define RUBY_VM_SET_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, PENDING_INTERRUPT_MASK)
24018#define RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, POSTPONED_JOB_INTERRUPT_MASK)
24019#define RUBY_VM_SET_TRAP_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TRAP_INTERRUPT_MASK)
24020#define RUBY_VM_SET_TERMINATE_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TERMINATE_INTERRUPT_MASK)
24021#define RUBY_VM_SET_VM_BARRIER_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, VM_BARRIER_INTERRUPT_MASK)
24022#define RUBY_VM_INTERRUPTED(ec) ((ec)->interrupt_flag & ~(ec)->interrupt_mask & (PENDING_INTERRUPT_MASK|TRAP_INTERRUPT_MASK))
24023#define RUBY_VM_CHECK_INTS(ec) rb_vm_check_ints(ec)
24024#define EXEC_EVENT_HOOK_ORIG(ec_,hooks_,flag_,self_,id_,called_id_,klass_,data_,pop_p_) do { const rb_event_flag_t flag_arg_ = (flag_); rb_hook_list_t *hooks_arg_ = (hooks_); if (UNLIKELY((hooks_arg_)->events & (flag_arg_))) { rb_exec_event_hook_orig(ec_, hooks_arg_, flag_arg_, self_, id_, called_id_, klass_, data_, pop_p_); } } while (0)
24025#define EXEC_EVENT_HOOK(ec_,flag_,self_,id_,called_id_,klass_,data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_ec_ractor_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 0)
24026#define EXEC_EVENT_HOOK_AND_POP_FRAME(ec_,flag_,self_,id_,called_id_,klass_,data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_ec_ractor_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 1)
24027#pragma GCC visibility push(default)
24028#define RUBY_EVENT_COVERAGE_LINE 0x010000
24029#define RUBY_EVENT_COVERAGE_BRANCH 0x020000
24030#pragma GCC visibility pop
24031#define PASS_PASSED_BLOCK_HANDLER_EC(ec) pass_passed_block_handler(ec)
24032#define PASS_PASSED_BLOCK_HANDLER() pass_passed_block_handler(GET_EC())
24033#define ruby_setjmp(env) RUBY_SETJMP(env)
24034#define ruby_longjmp(env,val) RUBY_LONGJMP((env),(val))
24035#define _ERRNO_H 1
24036#define _BITS_ERRNO_H 1
24037#define _ASM_GENERIC_ERRNO_H
24038#define _ASM_GENERIC_ERRNO_BASE_H
24039#define EPERM 1
24040#define ENOENT 2
24041#define ESRCH 3
24042#define EINTR 4
24043#define EIO 5
24044#define ENXIO 6
24045#define E2BIG 7
24046#define ENOEXEC 8
24047#define EBADF 9
24048#define ECHILD 10
24049#define EAGAIN 11
24050#define ENOMEM 12
24051#define EACCES 13
24052#define EFAULT 14
24053#define ENOTBLK 15
24054#define EBUSY 16
24055#define EEXIST 17
24056#define EXDEV 18
24057#define ENODEV 19
24058#define ENOTDIR 20
24059#define EISDIR 21
24060#define EINVAL 22
24061#define ENFILE 23
24062#define EMFILE 24
24063#define ENOTTY 25
24064#define ETXTBSY 26
24065#define EFBIG 27
24066#define ENOSPC 28
24067#define ESPIPE 29
24068#define EROFS 30
24069#define EMLINK 31
24070#define EPIPE 32
24071#define EDOM 33
24072#define ERANGE 34
24073#define EDEADLK 35
24074#define ENAMETOOLONG 36
24075#define ENOLCK 37
24076#define ENOSYS 38
24077#define ENOTEMPTY 39
24078#define ELOOP 40
24079#define EWOULDBLOCK EAGAIN
24080#define ENOMSG 42
24081#define EIDRM 43
24082#define ECHRNG 44
24083#define EL2NSYNC 45
24084#define EL3HLT 46
24085#define EL3RST 47
24086#define ELNRNG 48
24087#define EUNATCH 49
24088#define ENOCSI 50
24089#define EL2HLT 51
24090#define EBADE 52
24091#define EBADR 53
24092#define EXFULL 54
24093#define ENOANO 55
24094#define EBADRQC 56
24095#define EBADSLT 57
24096#define EDEADLOCK EDEADLK
24097#define EBFONT 59
24098#define ENOSTR 60
24099#define ENODATA 61
24100#define ETIME 62
24101#define ENOSR 63
24102#define ENONET 64
24103#define ENOPKG 65
24104#define EREMOTE 66
24105#define ENOLINK 67
24106#define EADV 68
24107#define ESRMNT 69
24108#define ECOMM 70
24109#define EPROTO 71
24110#define EMULTIHOP 72
24111#define EDOTDOT 73
24112#define EBADMSG 74
24113#define EOVERFLOW 75
24114#define ENOTUNIQ 76
24115#define EBADFD 77
24116#define EREMCHG 78
24117#define ELIBACC 79
24118#define ELIBBAD 80
24119#define ELIBSCN 81
24120#define ELIBMAX 82
24121#define ELIBEXEC 83
24122#define EILSEQ 84
24123#define ERESTART 85
24124#define ESTRPIPE 86
24125#define EUSERS 87
24126#define ENOTSOCK 88
24127#define EDESTADDRREQ 89
24128#define EMSGSIZE 90
24129#define EPROTOTYPE 91
24130#define ENOPROTOOPT 92
24131#define EPROTONOSUPPORT 93
24132#define ESOCKTNOSUPPORT 94
24133#define EOPNOTSUPP 95
24134#define EPFNOSUPPORT 96
24135#define EAFNOSUPPORT 97
24136#define EADDRINUSE 98
24137#define EADDRNOTAVAIL 99
24138#define ENETDOWN 100
24139#define ENETUNREACH 101
24140#define ENETRESET 102
24141#define ECONNABORTED 103
24142#define ECONNRESET 104
24143#define ENOBUFS 105
24144#define EISCONN 106
24145#define ENOTCONN 107
24146#define ESHUTDOWN 108
24147#define ETOOMANYREFS 109
24148#define ETIMEDOUT 110
24149#define ECONNREFUSED 111
24150#define EHOSTDOWN 112
24151#define EHOSTUNREACH 113
24152#define EALREADY 114
24153#define EINPROGRESS 115
24154#define ESTALE 116
24155#define EUCLEAN 117
24156#define ENOTNAM 118
24157#define ENAVAIL 119
24158#define EISNAM 120
24159#define EREMOTEIO 121
24160#define EDQUOT 122
24161#define ENOMEDIUM 123
24162#define EMEDIUMTYPE 124
24163#define ECANCELED 125
24164#define ENOKEY 126
24165#define EKEYEXPIRED 127
24166#define EKEYREVOKED 128
24167#define EKEYREJECTED 129
24168#define EOWNERDEAD 130
24169#define ENOTRECOVERABLE 131
24170#define ERFKILL 132
24171#define EHWPOISON 133
24172#define ENOTSUP EOPNOTSUPP
24173#define errno (*__errno_location ())
24174#define __error_t_defined 1
24175#define _SYS_PARAM_H 1
24176#define __need_NULL
24177#undef __need_ptrdiff_t
24178#undef __need_size_t
24179#undef __need_wchar_t
24180#undef NULL
24181#define NULL ((void *)0)
24182#undef __need_NULL
24183#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
24184#define __undef_ARG_MAX
24185#define _LINUX_PARAM_H
24186#define __ASM_GENERIC_PARAM_H
24187#define HZ 100
24188#define EXEC_PAGESIZE 4096
24189#define NOGROUP (-1)
24190#define MAXHOSTNAMELEN 64
24191#undef ARG_MAX
24192#undef __undef_ARG_MAX
24193#define MAXSYMLINKS 20
24194#define NOFILE 256
24195#define NCARGS 131072
24196#define NBBY CHAR_BIT
24197#define NGROUPS NGROUPS_MAX
24198#define CANBSIZ MAX_CANON
24199#define MAXPATHLEN PATH_MAX
24200#define NODEV ((dev_t) -1)
24201#define DEV_BSIZE 512
24202#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
24203#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
24204#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
24205#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
24206#define howmany(x,y) (((x) + ((y) - 1)) / (y))
24207#define roundup(x,y) (__builtin_constant_p (y) && powerof2 (y) ? (((x) + (y) - 1) & ~((y) - 1)) : ((((x) + ((y) - 1)) / (y)) * (y)))
24208#define powerof2(x) ((((x) - 1) & (x)) == 0)
24209#define MIN(a,b) (((a)<(b))?(a):(b))
24210#define MAX(a,b) (((a)>(b))?(a):(b))
24211#define SAVE_ROOT_JMPBUF_BEFORE_STMT
24212#define SAVE_ROOT_JMPBUF_AFTER_STMT
24213#define SAVE_ROOT_JMPBUF(th,stmt) do if (ruby_setjmp((th)->root_jmpbuf) == 0) { SAVE_ROOT_JMPBUF_BEFORE_STMT stmt; SAVE_ROOT_JMPBUF_AFTER_STMT } else { rb_fiber_start(); } while (0)
24214#define EC_PUSH_TAG(ec) do { rb_execution_context_t * const _ec = (ec); struct rb_vm_tag _tag; _tag.state = TAG_NONE; _tag.tag = Qundef; _tag.prev = _ec->tag; _tag.lock_rec = rb_ec_vm_lock_rec(_ec);
24215#define EC_POP_TAG() _ec->tag = _tag.prev; } while (0)
24216#define EC_TMPPOP_TAG() _ec->tag = _tag.prev
24217#define EC_REPUSH_TAG() (void)(_ec->tag = &_tag)
24218#define VAR_FROM_MEMORY(var) (var)
24219#define VAR_INITIALIZED(var) ((void)&(var))
24220#define VAR_NOCLOBBERED(var) var
24221#define EC_EXEC_TAG() (ruby_setjmp(_tag.buf) ? rb_ec_tag_state(VAR_FROM_MEMORY(_ec)) : (EC_REPUSH_TAG(), 0))
24222#define EC_JUMP_TAG(ec,st) rb_ec_tag_jump(ec, st)
24223#define INTERNAL_EXCEPTION_P(exc) FIXNUM_P(exc)
24224#define CREF_FL_PUSHED_BY_EVAL IMEMO_FL_USER1
24225#define CREF_FL_OMOD_SHARED IMEMO_FL_USER2
24226#pragma GCC diagnostic push
24227#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
24228#pragma GCC diagnostic pop
24229#define rb_ec_raised_set(ec,f) ((ec)->raised_flag |= (f))
24230#define rb_ec_raised_reset(ec,f) ((ec)->raised_flag &= ~(f))
24231#define rb_ec_raised_p(ec,f) (((ec)->raised_flag & (f)) != 0)
24232#define rb_ec_raised_clear(ec) ((ec)->raised_flag = 0)
24233#define CharNext(p) rb_char_next(p)
24234#define RUBY_GC_H 1
24235#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movq\t%%rsp, %0" : "=r" (*(p)))
24236#define RB_GC_SAVE_MACHINE_CONTEXT(th) do { FLUSH_REGISTER_WINDOWS; setjmp((th)->ec->machine.regs); SET_MACHINE_STACK_END(&(th)->ec->machine.stack_end); } while (0)
24237#define RUBY_MARK_FREE_DEBUG 0
24238#define RUBY_MARK_ENTER(msg)
24239#define RUBY_MARK_LEAVE(msg)
24240#define RUBY_FREE_ENTER(msg)
24241#define RUBY_FREE_LEAVE(msg)
24242#define RUBY_GC_INFO if(0)printf
24243#define RUBY_MARK_MOVABLE_UNLESS_NULL(ptr) do { VALUE markobj = (ptr); if (RTEST(markobj)) {rb_gc_mark_movable(markobj);} } while (0)
24244#define RUBY_MARK_UNLESS_NULL(ptr) do { VALUE markobj = (ptr); if (RTEST(markobj)) {rb_gc_mark(markobj);} } while (0)
24245#define RUBY_FREE_UNLESS_NULL(ptr) if(ptr){ruby_xfree(ptr);(ptr)=NULL;}
24246#define STACK_UPPER(x,a,b) (b)
24247#define STACK_GROW_DIR_DETECTION
24248#define STACK_DIR_UPPER(a,b) STACK_UPPER(0, (a), (b))
24249#define IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0)
24250#pragma GCC visibility push(default)
24251#pragma GCC visibility pop
24252#define INTERNAL_COMPILE_H
24253#pragma GCC visibility push(default)
24254#pragma GCC visibility pop
24255#define INTERNAL_CONT_H
24256#define INTERNAL_ERROR_H
24257#define INTERNAL_STRING_H
24258#define RUBY_ENCODING_H 1
24259#define ONIGURUMA_H
24260#define ONIGMO_H
24261#define ONIGMO_VERSION_MAJOR 6
24262#define ONIGMO_VERSION_MINOR 1
24263#define ONIGMO_VERSION_TEENY 3
24264#define ONIG_EXTERN RUBY_EXTERN
24265#pragma GCC visibility push(default)
24266#define UChar OnigUChar
24267#define ONIG_INFINITE_DISTANCE ~((OnigDistance )0)
24268#define OnigCodePointMaskWidth 3
24269#define OnigCodePointMask ((1<<OnigCodePointMaskWidth)-1)
24270#define OnigCodePointCount(n) ((n)&OnigCodePointMask)
24271#define OnigCaseFoldFlags(n) ((n)&~OnigCodePointMask)
24272#define OnigSpecialIndexShift 3
24273#define OnigSpecialIndexWidth 10
24274#define ONIGENC_CASE_UPCASE (1<<13)
24275#define ONIGENC_CASE_DOWNCASE (1<<14)
24276#define ONIGENC_CASE_TITLECASE (1<<15)
24277#define ONIGENC_CASE_SPECIAL_OFFSET 3
24278#define ONIGENC_CASE_UP_SPECIAL (1<<16)
24279#define ONIGENC_CASE_DOWN_SPECIAL (1<<17)
24280#define ONIGENC_CASE_MODIFIED (1<<18)
24281#define ONIGENC_CASE_FOLD (1<<19)
24282#define ONIGENC_CASE_FOLD_TURKISH_AZERI (1<<20)
24283#define ONIGENC_CASE_FOLD_LITHUANIAN (1<<21)
24284#define ONIGENC_CASE_ASCII_ONLY (1<<22)
24285#define ONIGENC_CASE_IS_TITLECASE (1<<23)
24286#define INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR (1<<30)
24287#define ONIGENC_CASE_FOLD_MIN INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR
24288#define ONIGENC_CASE_FOLD_DEFAULT OnigDefaultCaseFoldFlag
24289#define ONIGENC_MAX_COMP_CASE_FOLD_CODE_LEN 3
24290#define ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM 13
24291#define ONIGENC_CODE_RANGE_NUM(range) ((int )range[0])
24292#define ONIGENC_CODE_RANGE_FROM(range,i) range[((i)*2) + 1]
24293#define ONIGENC_CODE_RANGE_TO(range,i) range[((i)*2) + 2]
24294#define ONIG_ENCODING_ASCII (&OnigEncodingASCII)
24295#define ONIG_ENCODING_UNDEF ((OnigEncoding )0)
24296#define ONIGENC_CODE_TO_MBC_MAXLEN 7
24297#define ONIGENC_MBC_CASE_FOLD_MAXLEN 18
24298#define ONIGENC_CTYPE_NEWLINE 0
24299#define ONIGENC_CTYPE_ALPHA 1
24300#define ONIGENC_CTYPE_BLANK 2
24301#define ONIGENC_CTYPE_CNTRL 3
24302#define ONIGENC_CTYPE_DIGIT 4
24303#define ONIGENC_CTYPE_GRAPH 5
24304#define ONIGENC_CTYPE_LOWER 6
24305#define ONIGENC_CTYPE_PRINT 7
24306#define ONIGENC_CTYPE_PUNCT 8
24307#define ONIGENC_CTYPE_SPACE 9
24308#define ONIGENC_CTYPE_UPPER 10
24309#define ONIGENC_CTYPE_XDIGIT 11
24310#define ONIGENC_CTYPE_WORD 12
24311#define ONIGENC_CTYPE_ALNUM 13
24312#define ONIGENC_CTYPE_ASCII 14
24313#define ONIGENC_MAX_STD_CTYPE ONIGENC_CTYPE_ASCII
24314#define ONIGENC_FLAG_NONE 0U
24315#define ONIGENC_FLAG_UNICODE 1U
24316#define onig_enc_len(enc,p,e) ONIGENC_MBC_ENC_LEN(enc, p, e)
24317#define ONIGENC_IS_UNDEF(enc) ((enc) == ONIG_ENCODING_UNDEF)
24318#define ONIGENC_IS_SINGLEBYTE(enc) (ONIGENC_MBC_MAXLEN(enc) == 1)
24319#define ONIGENC_IS_MBC_HEAD(enc,p,e) (ONIGENC_MBC_ENC_LEN(enc,p,e) != 1)
24320#define ONIGENC_IS_MBC_ASCII(p) (*(p) < 128)
24321#define ONIGENC_IS_CODE_ASCII(code) ((code) < 128)
24322#define ONIGENC_IS_MBC_WORD(enc,s,end) ONIGENC_IS_CODE_WORD(enc,ONIGENC_MBC_TO_CODE(enc,s,end))
24323#define ONIGENC_IS_MBC_ASCII_WORD(enc,s,end) onigenc_ascii_is_code_ctype( ONIGENC_MBC_TO_CODE(enc,s,end),ONIGENC_CTYPE_WORD,enc)
24324#define ONIGENC_IS_UNICODE(enc) ((enc)->flags & ONIGENC_FLAG_UNICODE)
24325#define ONIGENC_NAME(enc) ((enc)->name)
24326#define ONIGENC_MBC_CASE_FOLD(enc,flag,pp,end,buf) (enc)->mbc_case_fold(flag,(const OnigUChar** )pp,end,buf,enc)
24327#define ONIGENC_IS_ALLOWED_REVERSE_MATCH(enc,s,end) (enc)->is_allowed_reverse_match(s,end,enc)
24328#define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc,start,s,end) (enc)->left_adjust_char_head(start, s, end, enc)
24329#define ONIGENC_APPLY_ALL_CASE_FOLD(enc,case_fold_flag,f,arg) (enc)->apply_all_case_fold(case_fold_flag,f,arg,enc)
24330#define ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc,case_fold_flag,p,end,acs) (enc)->get_case_fold_codes_by_str(case_fold_flag,p,end,acs,enc)
24331#define ONIGENC_STEP_BACK(enc,start,s,end,n) onigenc_step_back((enc),(start),(s),(end),(n))
24332#define ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) (n)
24333#define ONIGENC_MBCLEN_CHARFOUND_P(r) (0 < (r))
24334#define ONIGENC_MBCLEN_CHARFOUND_LEN(r) (r)
24335#define ONIGENC_CONSTRUCT_MBCLEN_INVALID() (-1)
24336#define ONIGENC_MBCLEN_INVALID_P(r) ((r) == -1)
24337#define ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(n) (-1-(n))
24338#define ONIGENC_MBCLEN_NEEDMORE_P(r) ((r) < -1)
24339#define ONIGENC_MBCLEN_NEEDMORE_LEN(r) (-1-(r))
24340#define ONIGENC_PRECISE_MBC_ENC_LEN(enc,p,e) (enc)->precise_mbc_enc_len(p,e,enc)
24341#define ONIGENC_MBC_ENC_LEN(enc,p,e) onigenc_mbclen_approximate(p,e,enc)
24342#define ONIGENC_MBC_MAXLEN(enc) ((enc)->max_enc_len)
24343#define ONIGENC_MBC_MAXLEN_DIST(enc) ONIGENC_MBC_MAXLEN(enc)
24344#define ONIGENC_MBC_MINLEN(enc) ((enc)->min_enc_len)
24345#define ONIGENC_IS_MBC_NEWLINE(enc,p,end) (enc)->is_mbc_newline((p),(end),enc)
24346#define ONIGENC_MBC_TO_CODE(enc,p,end) (enc)->mbc_to_code((p),(end),enc)
24347#define ONIGENC_CODE_TO_MBCLEN(enc,code) (enc)->code_to_mbclen(code,enc)
24348#define ONIGENC_CODE_TO_MBC(enc,code,buf) (enc)->code_to_mbc(code,buf,enc)
24349#define ONIGENC_PROPERTY_NAME_TO_CTYPE(enc,p,end) (enc)->property_name_to_ctype(enc,p,end)
24350#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype) (enc)->is_code_ctype(code,ctype,enc)
24351#define ONIGENC_IS_CODE_NEWLINE(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_NEWLINE)
24352#define ONIGENC_IS_CODE_GRAPH(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_GRAPH)
24353#define ONIGENC_IS_CODE_PRINT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PRINT)
24354#define ONIGENC_IS_CODE_ALNUM(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALNUM)
24355#define ONIGENC_IS_CODE_ALPHA(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALPHA)
24356#define ONIGENC_IS_CODE_LOWER(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_LOWER)
24357#define ONIGENC_IS_CODE_UPPER(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_UPPER)
24358#define ONIGENC_IS_CODE_CNTRL(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_CNTRL)
24359#define ONIGENC_IS_CODE_PUNCT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PUNCT)
24360#define ONIGENC_IS_CODE_SPACE(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_SPACE)
24361#define ONIGENC_IS_CODE_BLANK(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_BLANK)
24362#define ONIGENC_IS_CODE_DIGIT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT)
24363#define ONIGENC_IS_CODE_XDIGIT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_XDIGIT)
24364#define ONIGENC_IS_CODE_WORD(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
24365#define ONIGENC_GET_CTYPE_CODE_RANGE(enc,ctype,sbout,ranges) (enc)->get_ctype_code_range(ctype,sbout,ranges,enc)
24366#define ONIG_NREGION 4
24367#define ONIG_MAX_CAPTURE_GROUP_NUM 32767
24368#define ONIG_MAX_BACKREF_NUM 1000
24369#define ONIG_MAX_REPEAT_NUM 100000
24370#define ONIG_MAX_MULTI_BYTE_RANGES_NUM 10000
24371#define ONIG_MAX_ERROR_MESSAGE_LEN 90
24372#define ONIG_OPTION_DEFAULT ONIG_OPTION_NONE
24373#define ONIG_OPTION_NONE 0U
24374#define ONIG_OPTION_IGNORECASE 1U
24375#define ONIG_OPTION_EXTEND (ONIG_OPTION_IGNORECASE << 1)
24376#define ONIG_OPTION_MULTILINE (ONIG_OPTION_EXTEND << 1)
24377#define ONIG_OPTION_DOTALL ONIG_OPTION_MULTILINE
24378#define ONIG_OPTION_SINGLELINE (ONIG_OPTION_MULTILINE << 1)
24379#define ONIG_OPTION_FIND_LONGEST (ONIG_OPTION_SINGLELINE << 1)
24380#define ONIG_OPTION_FIND_NOT_EMPTY (ONIG_OPTION_FIND_LONGEST << 1)
24381#define ONIG_OPTION_NEGATE_SINGLELINE (ONIG_OPTION_FIND_NOT_EMPTY << 1)
24382#define ONIG_OPTION_DONT_CAPTURE_GROUP (ONIG_OPTION_NEGATE_SINGLELINE << 1)
24383#define ONIG_OPTION_CAPTURE_GROUP (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
24384#define ONIG_OPTION_NOTBOL (ONIG_OPTION_CAPTURE_GROUP << 1)
24385#define ONIG_OPTION_NOTEOL (ONIG_OPTION_NOTBOL << 1)
24386#define ONIG_OPTION_NOTBOS (ONIG_OPTION_NOTEOL << 1)
24387#define ONIG_OPTION_NOTEOS (ONIG_OPTION_NOTBOS << 1)
24388#define ONIG_OPTION_ASCII_RANGE (ONIG_OPTION_NOTEOS << 1)
24389#define ONIG_OPTION_POSIX_BRACKET_ALL_RANGE (ONIG_OPTION_ASCII_RANGE << 1)
24390#define ONIG_OPTION_WORD_BOUND_ALL_RANGE (ONIG_OPTION_POSIX_BRACKET_ALL_RANGE << 1)
24391#define ONIG_OPTION_NEWLINE_CRLF (ONIG_OPTION_WORD_BOUND_ALL_RANGE << 1)
24392#define ONIG_OPTION_MAXBIT ONIG_OPTION_NEWLINE_CRLF
24393#define ONIG_OPTION_ON(options,regopt) ((options) |= (regopt))
24394#define ONIG_OPTION_OFF(options,regopt) ((options) &= ~(regopt))
24395#define ONIG_IS_OPTION_ON(options,option) ((options) & (option))
24396#define ONIG_SYNTAX_ASIS (&OnigSyntaxASIS)
24397#define ONIG_SYNTAX_POSIX_BASIC (&OnigSyntaxPosixBasic)
24398#define ONIG_SYNTAX_POSIX_EXTENDED (&OnigSyntaxPosixExtended)
24399#define ONIG_SYNTAX_EMACS (&OnigSyntaxEmacs)
24400#define ONIG_SYNTAX_GREP (&OnigSyntaxGrep)
24401#define ONIG_SYNTAX_GNU_REGEX (&OnigSyntaxGnuRegex)
24402#define ONIG_SYNTAX_JAVA (&OnigSyntaxJava)
24403#define ONIG_SYNTAX_PERL58 (&OnigSyntaxPerl58)
24404#define ONIG_SYNTAX_PERL58_NG (&OnigSyntaxPerl58_NG)
24405#define ONIG_SYNTAX_PERL (&OnigSyntaxPerl)
24406#define ONIG_SYNTAX_RUBY (&OnigSyntaxRuby)
24407#define ONIG_SYNTAX_PYTHON (&OnigSyntaxPython)
24408#define ONIG_SYNTAX_DEFAULT OnigDefaultSyntax
24409#define ONIG_SYN_OP_VARIABLE_META_CHARACTERS (1U<<0)
24410#define ONIG_SYN_OP_DOT_ANYCHAR (1U<<1)
24411#define ONIG_SYN_OP_ASTERISK_ZERO_INF (1U<<2)
24412#define ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF (1U<<3)
24413#define ONIG_SYN_OP_PLUS_ONE_INF (1U<<4)
24414#define ONIG_SYN_OP_ESC_PLUS_ONE_INF (1U<<5)
24415#define ONIG_SYN_OP_QMARK_ZERO_ONE (1U<<6)
24416#define ONIG_SYN_OP_ESC_QMARK_ZERO_ONE (1U<<7)
24417#define ONIG_SYN_OP_BRACE_INTERVAL (1U<<8)
24418#define ONIG_SYN_OP_ESC_BRACE_INTERVAL (1U<<9)
24419#define ONIG_SYN_OP_VBAR_ALT (1U<<10)
24420#define ONIG_SYN_OP_ESC_VBAR_ALT (1U<<11)
24421#define ONIG_SYN_OP_LPAREN_SUBEXP (1U<<12)
24422#define ONIG_SYN_OP_ESC_LPAREN_SUBEXP (1U<<13)
24423#define ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR (1U<<14)
24424#define ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR (1U<<15)
24425#define ONIG_SYN_OP_DECIMAL_BACKREF (1U<<16)
24426#define ONIG_SYN_OP_BRACKET_CC (1U<<17)
24427#define ONIG_SYN_OP_ESC_W_WORD (1U<<18)
24428#define ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END (1U<<19)
24429#define ONIG_SYN_OP_ESC_B_WORD_BOUND (1U<<20)
24430#define ONIG_SYN_OP_ESC_S_WHITE_SPACE (1U<<21)
24431#define ONIG_SYN_OP_ESC_D_DIGIT (1U<<22)
24432#define ONIG_SYN_OP_LINE_ANCHOR (1U<<23)
24433#define ONIG_SYN_OP_POSIX_BRACKET (1U<<24)
24434#define ONIG_SYN_OP_QMARK_NON_GREEDY (1U<<25)
24435#define ONIG_SYN_OP_ESC_CONTROL_CHARS (1U<<26)
24436#define ONIG_SYN_OP_ESC_C_CONTROL (1U<<27)
24437#define ONIG_SYN_OP_ESC_OCTAL3 (1U<<28)
24438#define ONIG_SYN_OP_ESC_X_HEX2 (1U<<29)
24439#define ONIG_SYN_OP_ESC_X_BRACE_HEX8 (1U<<30)
24440#define ONIG_SYN_OP_ESC_O_BRACE_OCTAL (1U<<31)
24441#define ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE (1U<<0)
24442#define ONIG_SYN_OP2_QMARK_GROUP_EFFECT (1U<<1)
24443#define ONIG_SYN_OP2_OPTION_PERL (1U<<2)
24444#define ONIG_SYN_OP2_OPTION_RUBY (1U<<3)
24445#define ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT (1U<<4)
24446#define ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL (1U<<5)
24447#define ONIG_SYN_OP2_CCLASS_SET_OP (1U<<6)
24448#define ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP (1U<<7)
24449#define ONIG_SYN_OP2_ESC_K_NAMED_BACKREF (1U<<8)
24450#define ONIG_SYN_OP2_ESC_G_SUBEXP_CALL (1U<<9)
24451#define ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY (1U<<10)
24452#define ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL (1U<<11)
24453#define ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META (1U<<12)
24454#define ONIG_SYN_OP2_ESC_V_VTAB (1U<<13)
24455#define ONIG_SYN_OP2_ESC_U_HEX4 (1U<<14)
24456#define ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR (1U<<15)
24457#define ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY (1U<<16)
24458#define ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT (1U<<17)
24459#define ONIG_SYN_OP2_ESC_H_XDIGIT (1U<<19)
24460#define ONIG_SYN_OP2_INEFFECTIVE_ESCAPE (1U<<20)
24461#define ONIG_SYN_OP2_ESC_CAPITAL_R_LINEBREAK (1U<<21)
24462#define ONIG_SYN_OP2_ESC_CAPITAL_X_EXTENDED_GRAPHEME_CLUSTER (1U<<22)
24463#define ONIG_SYN_OP2_ESC_V_VERTICAL_WHITESPACE (1U<<23)
24464#define ONIG_SYN_OP2_ESC_H_HORIZONTAL_WHITESPACE (1U<<24)
24465#define ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP (1U<<25)
24466#define ONIG_SYN_OP2_ESC_G_BRACE_BACKREF (1U<<26)
24467#define ONIG_SYN_OP2_QMARK_SUBEXP_CALL (1U<<27)
24468#define ONIG_SYN_OP2_QMARK_VBAR_BRANCH_RESET (1U<<28)
24469#define ONIG_SYN_OP2_QMARK_LPAREN_CONDITION (1U<<29)
24470#define ONIG_SYN_OP2_QMARK_CAPITAL_P_NAMED_GROUP (1U<<30)
24471#define ONIG_SYN_OP2_QMARK_TILDE_ABSENT (1U<<31)
24472#define ONIG_SYN_CONTEXT_INDEP_ANCHORS (1U<<31)
24473#define ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS (1U<<0)
24474#define ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS (1U<<1)
24475#define ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP (1U<<2)
24476#define ONIG_SYN_ALLOW_INVALID_INTERVAL (1U<<3)
24477#define ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV (1U<<4)
24478#define ONIG_SYN_STRICT_CHECK_BACKREF (1U<<5)
24479#define ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND (1U<<6)
24480#define ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP (1U<<7)
24481#define ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME (1U<<8)
24482#define ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY (1U<<9)
24483#define ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME_CALL (1U<<10)
24484#define ONIG_SYN_USE_LEFT_MOST_NAMED_GROUP (1U<<11)
24485#define ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC (1U<<20)
24486#define ONIG_SYN_BACKSLASH_ESCAPE_IN_CC (1U<<21)
24487#define ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC (1U<<22)
24488#define ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC (1U<<23)
24489#define ONIG_SYN_WARN_CC_OP_NOT_ESCAPED (1U<<24)
24490#define ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT (1U<<25)
24491#define ONIG_SYN_WARN_CC_DUP (1U<<26)
24492#define ONIG_META_CHAR_ESCAPE 0
24493#define ONIG_META_CHAR_ANYCHAR 1
24494#define ONIG_META_CHAR_ANYTIME 2
24495#define ONIG_META_CHAR_ZERO_OR_ONE_TIME 3
24496#define ONIG_META_CHAR_ONE_OR_MORE_TIME 4
24497#define ONIG_META_CHAR_ANYCHAR_ANYTIME 5
24498#define ONIG_INEFFECTIVE_META_CHAR 0
24499#define ONIG_IS_PATTERN_ERROR(ecode) ((ecode) <= -100 && (ecode) > -1000)
24500#define ONIG_NORMAL 0
24501#define ONIG_MISMATCH -1
24502#define ONIG_NO_SUPPORT_CONFIG -2
24503#define ONIGERR_MEMORY -5
24504#define ONIGERR_TYPE_BUG -6
24505#define ONIGERR_PARSER_BUG -11
24506#define ONIGERR_STACK_BUG -12
24507#define ONIGERR_UNDEFINED_BYTECODE -13
24508#define ONIGERR_UNEXPECTED_BYTECODE -14
24509#define ONIGERR_MATCH_STACK_LIMIT_OVER -15
24510#define ONIGERR_PARSE_DEPTH_LIMIT_OVER -16
24511#define ONIGERR_DEFAULT_ENCODING_IS_NOT_SET -21
24512#define ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR -22
24513#define ONIGERR_INVALID_ARGUMENT -30
24514#define ONIGERR_END_PATTERN_AT_LEFT_BRACE -100
24515#define ONIGERR_END_PATTERN_AT_LEFT_BRACKET -101
24516#define ONIGERR_EMPTY_CHAR_CLASS -102
24517#define ONIGERR_PREMATURE_END_OF_CHAR_CLASS -103
24518#define ONIGERR_END_PATTERN_AT_ESCAPE -104
24519#define ONIGERR_END_PATTERN_AT_META -105
24520#define ONIGERR_END_PATTERN_AT_CONTROL -106
24521#define ONIGERR_META_CODE_SYNTAX -108
24522#define ONIGERR_CONTROL_CODE_SYNTAX -109
24523#define ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE -110
24524#define ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE -111
24525#define ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS -112
24526#define ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED -113
24527#define ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID -114
24528#define ONIGERR_NESTED_REPEAT_OPERATOR -115
24529#define ONIGERR_UNMATCHED_CLOSE_PARENTHESIS -116
24530#define ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS -117
24531#define ONIGERR_END_PATTERN_IN_GROUP -118
24532#define ONIGERR_UNDEFINED_GROUP_OPTION -119
24533#define ONIGERR_INVALID_POSIX_BRACKET_TYPE -121
24534#define ONIGERR_INVALID_LOOK_BEHIND_PATTERN -122
24535#define ONIGERR_INVALID_REPEAT_RANGE_PATTERN -123
24536#define ONIGERR_INVALID_CONDITION_PATTERN -124
24537#define ONIGERR_TOO_BIG_NUMBER -200
24538#define ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE -201
24539#define ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE -202
24540#define ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS -203
24541#define ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE -204
24542#define ONIGERR_TOO_MANY_MULTI_BYTE_RANGES -205
24543#define ONIGERR_TOO_SHORT_MULTI_BYTE_STRING -206
24544#define ONIGERR_TOO_BIG_BACKREF_NUMBER -207
24545#define ONIGERR_INVALID_BACKREF -208
24546#define ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED -209
24547#define ONIGERR_TOO_MANY_CAPTURE_GROUPS -210
24548#define ONIGERR_TOO_SHORT_DIGITS -211
24549#define ONIGERR_TOO_LONG_WIDE_CHAR_VALUE -212
24550#define ONIGERR_EMPTY_GROUP_NAME -214
24551#define ONIGERR_INVALID_GROUP_NAME -215
24552#define ONIGERR_INVALID_CHAR_IN_GROUP_NAME -216
24553#define ONIGERR_UNDEFINED_NAME_REFERENCE -217
24554#define ONIGERR_UNDEFINED_GROUP_REFERENCE -218
24555#define ONIGERR_MULTIPLEX_DEFINED_NAME -219
24556#define ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL -220
24557#define ONIGERR_NEVER_ENDING_RECURSION -221
24558#define ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY -222
24559#define ONIGERR_INVALID_CHAR_PROPERTY_NAME -223
24560#define ONIGERR_INVALID_CODE_POINT_VALUE -400
24561#define ONIGERR_INVALID_WIDE_CHAR_VALUE -400
24562#define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE -401
24563#define ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION -402
24564#define ONIGERR_INVALID_COMBINATION_OF_OPTIONS -403
24565#define ONIG_MAX_CAPTURE_HISTORY_GROUP 31
24566#define ONIG_IS_CAPTURE_HISTORY_GROUP(r,i) ((i) <= ONIG_MAX_CAPTURE_HISTORY_GROUP && (r)->list && (r)->list[i])
24567#define ONIG_TRAVERSE_CALLBACK_AT_FIRST 1
24568#define ONIG_TRAVERSE_CALLBACK_AT_LAST 2
24569#define ONIG_TRAVERSE_CALLBACK_AT_BOTH ( ONIG_TRAVERSE_CALLBACK_AT_FIRST | ONIG_TRAVERSE_CALLBACK_AT_LAST )
24570#define ONIG_REGION_NOTPOS -1
24571#define ONIG_NULL_WARN onig_null_warn
24572#define ONIG_CHAR_TABLE_SIZE 256
24573#pragma GCC visibility pop
24574#define ONIGURUMA
24575#define ONIGURUMA_VERSION_MAJOR ONIGMO_VERSION_MAJOR
24576#define ONIGURUMA_VERSION_MINOR ONIGMO_VERSION_MINOR
24577#define ONIGURUMA_VERSION_TEENY ONIGMO_VERSION_TEENY
24578#pragma GCC visibility push(default)
24579#define ENCODING_INLINE_MAX RUBY_ENCODING_INLINE_MAX
24580#define ENCODING_SHIFT RUBY_ENCODING_SHIFT
24581#define ENCODING_MASK RUBY_ENCODING_MASK
24582#define RB_ENCODING_SET_INLINED(obj,i) do { RBASIC(obj)->flags &= ~RUBY_ENCODING_MASK; RBASIC(obj)->flags |= (VALUE)(i) << RUBY_ENCODING_SHIFT;} while (0)
24583#define RB_ENCODING_SET(obj,i) rb_enc_set_index((obj), (i))
24584#define RB_ENCODING_GET_INLINED(obj) (int)((RBASIC(obj)->flags & RUBY_ENCODING_MASK)>>RUBY_ENCODING_SHIFT)
24585#define RB_ENCODING_GET(obj) (RB_ENCODING_GET_INLINED(obj) != RUBY_ENCODING_INLINE_MAX ? RB_ENCODING_GET_INLINED(obj) : rb_enc_get_index(obj))
24586#define RB_ENCODING_IS_ASCII8BIT(obj) (RB_ENCODING_GET_INLINED(obj) == 0)
24587#define ENCODING_SET_INLINED(obj,i) RB_ENCODING_SET_INLINED(obj,i)
24588#define ENCODING_SET(obj,i) RB_ENCODING_SET(obj,i)
24589#define ENCODING_GET_INLINED(obj) RB_ENCODING_GET_INLINED(obj)
24590#define ENCODING_GET(obj) RB_ENCODING_GET(obj)
24591#define ENCODING_IS_ASCII8BIT(obj) RB_ENCODING_IS_ASCII8BIT(obj)
24592#define ENCODING_MAXNAMELEN RUBY_ENCODING_MAXNAMELEN
24593#define RB_ENC_CODERANGE_CLEAN_P(cr) rb_enc_coderange_clean_p(cr)
24594#define RB_ENC_CODERANGE(obj) ((int)RBASIC(obj)->flags & RUBY_ENC_CODERANGE_MASK)
24595#define RB_ENC_CODERANGE_ASCIIONLY(obj) (RB_ENC_CODERANGE(obj) == RUBY_ENC_CODERANGE_7BIT)
24596#define RB_ENC_CODERANGE_SET(obj,cr) ( RBASIC(obj)->flags = (RBASIC(obj)->flags & ~RUBY_ENC_CODERANGE_MASK) | (cr))
24597#define RB_ENC_CODERANGE_CLEAR(obj) RB_ENC_CODERANGE_SET((obj),0)
24598#define RB_ENC_CODERANGE_AND(a,b) ((a) == RUBY_ENC_CODERANGE_7BIT ? (b) : (a) != RUBY_ENC_CODERANGE_VALID ? RUBY_ENC_CODERANGE_UNKNOWN : (b) == RUBY_ENC_CODERANGE_7BIT ? RUBY_ENC_CODERANGE_VALID : (b))
24599#define RB_ENCODING_CODERANGE_SET(obj,encindex,cr) do { VALUE rb_encoding_coderange_obj = (obj); RB_ENCODING_SET(rb_encoding_coderange_obj, (encindex)); RB_ENC_CODERANGE_SET(rb_encoding_coderange_obj, (cr)); } while (0)
24600#define ENC_CODERANGE_MASK RUBY_ENC_CODERANGE_MASK
24601#define ENC_CODERANGE_UNKNOWN RUBY_ENC_CODERANGE_UNKNOWN
24602#define ENC_CODERANGE_7BIT RUBY_ENC_CODERANGE_7BIT
24603#define ENC_CODERANGE_VALID RUBY_ENC_CODERANGE_VALID
24604#define ENC_CODERANGE_BROKEN RUBY_ENC_CODERANGE_BROKEN
24605#define ENC_CODERANGE_CLEAN_P(cr) RB_ENC_CODERANGE_CLEAN_P(cr)
24606#define ENC_CODERANGE(obj) RB_ENC_CODERANGE(obj)
24607#define ENC_CODERANGE_ASCIIONLY(obj) RB_ENC_CODERANGE_ASCIIONLY(obj)
24608#define ENC_CODERANGE_SET(obj,cr) RB_ENC_CODERANGE_SET(obj,cr)
24609#define ENC_CODERANGE_CLEAR(obj) RB_ENC_CODERANGE_CLEAR(obj)
24610#define ENC_CODERANGE_AND(a,b) RB_ENC_CODERANGE_AND(a, b)
24611#define ENCODING_CODERANGE_SET(obj,encindex,cr) RB_ENCODING_CODERANGE_SET(obj, encindex, cr)
24612#define rb_enc_str_new(str,len,enc) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str) && __builtin_constant_p(len)) ? rb_enc_str_new_static((str), (len), (enc)) : rb_enc_str_new((str), (len), (enc)) )
24613#define rb_enc_str_new_cstr(str,enc) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_enc_str_new_static((str), (long)strlen(str), (enc)) : rb_enc_str_new_cstr((str), (enc)) )
24614#define rb_enc_name(enc) (enc)->name
24615#define rb_enc_mbminlen(enc) (enc)->min_enc_len
24616#define rb_enc_mbmaxlen(enc) (enc)->max_enc_len
24617#define MBCLEN_CHARFOUND_P(ret) ONIGENC_MBCLEN_CHARFOUND_P(ret)
24618#define MBCLEN_CHARFOUND_LEN(ret) ONIGENC_MBCLEN_CHARFOUND_LEN(ret)
24619#define MBCLEN_INVALID_P(ret) ONIGENC_MBCLEN_INVALID_P(ret)
24620#define MBCLEN_NEEDMORE_P(ret) ONIGENC_MBCLEN_NEEDMORE_P(ret)
24621#define MBCLEN_NEEDMORE_LEN(ret) ONIGENC_MBCLEN_NEEDMORE_LEN(ret)
24622#define rb_enc_codepoint(p,e,enc) rb_enc_codepoint_len((p),(e),0,(enc))
24623#define rb_enc_mbc_to_codepoint(p,e,enc) ONIGENC_MBC_TO_CODE((enc),(UChar*)(p),(UChar*)(e))
24624#define rb_enc_code_to_mbclen(c,enc) ONIGENC_CODE_TO_MBCLEN((enc), (c));
24625#define rb_enc_mbcput(c,buf,enc) ONIGENC_CODE_TO_MBC((enc),(c),(UChar*)(buf))
24626#define rb_enc_prev_char(s,p,e,enc) ((char *)onigenc_get_prev_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e)))
24627#define rb_enc_left_char_head(s,p,e,enc) ((char *)onigenc_get_left_adjust_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e)))
24628#define rb_enc_right_char_head(s,p,e,enc) ((char *)onigenc_get_right_adjust_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e)))
24629#define rb_enc_step_back(s,p,e,n,enc) ((char *)onigenc_step_back((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e),(int)(n)))
24630#define rb_enc_is_newline(p,end,enc) ONIGENC_IS_MBC_NEWLINE((enc),(UChar*)(p),(UChar*)(end))
24631#define rb_enc_isctype(c,t,enc) ONIGENC_IS_CODE_CTYPE((enc),(c),(t))
24632#define rb_enc_isascii(c,enc) ONIGENC_IS_CODE_ASCII(c)
24633#define rb_enc_isalpha(c,enc) ONIGENC_IS_CODE_ALPHA((enc),(c))
24634#define rb_enc_islower(c,enc) ONIGENC_IS_CODE_LOWER((enc),(c))
24635#define rb_enc_isupper(c,enc) ONIGENC_IS_CODE_UPPER((enc),(c))
24636#define rb_enc_ispunct(c,enc) ONIGENC_IS_CODE_PUNCT((enc),(c))
24637#define rb_enc_isalnum(c,enc) ONIGENC_IS_CODE_ALNUM((enc),(c))
24638#define rb_enc_isprint(c,enc) ONIGENC_IS_CODE_PRINT((enc),(c))
24639#define rb_enc_isspace(c,enc) ONIGENC_IS_CODE_SPACE((enc),(c))
24640#define rb_enc_isdigit(c,enc) ONIGENC_IS_CODE_DIGIT((enc),(c))
24641#define rb_enc_asciicompat(enc) rb_enc_asciicompat_inline(enc)
24642#define rb_enc_str_asciicompat_p(str) rb_enc_asciicompat(rb_enc_get(str))
24643#define ECONV_ERROR_HANDLER_MASK RUBY_ECONV_ERROR_HANDLER_MASK
24644#define ECONV_INVALID_MASK RUBY_ECONV_INVALID_MASK
24645#define ECONV_INVALID_REPLACE RUBY_ECONV_INVALID_REPLACE
24646#define ECONV_UNDEF_MASK RUBY_ECONV_UNDEF_MASK
24647#define ECONV_UNDEF_REPLACE RUBY_ECONV_UNDEF_REPLACE
24648#define ECONV_UNDEF_HEX_CHARREF RUBY_ECONV_UNDEF_HEX_CHARREF
24649#define ECONV_DECORATOR_MASK RUBY_ECONV_DECORATOR_MASK
24650#define ECONV_NEWLINE_DECORATOR_MASK RUBY_ECONV_NEWLINE_DECORATOR_MASK
24651#define ECONV_NEWLINE_DECORATOR_READ_MASK RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK
24652#define ECONV_NEWLINE_DECORATOR_WRITE_MASK RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK
24653#define ECONV_UNIVERSAL_NEWLINE_DECORATOR RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR
24654#define ECONV_CRLF_NEWLINE_DECORATOR RUBY_ECONV_CRLF_NEWLINE_DECORATOR
24655#define ECONV_CR_NEWLINE_DECORATOR RUBY_ECONV_CR_NEWLINE_DECORATOR
24656#define ECONV_XML_TEXT_DECORATOR RUBY_ECONV_XML_TEXT_DECORATOR
24657#define ECONV_XML_ATTR_CONTENT_DECORATOR RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR
24658#define ECONV_STATEFUL_DECORATOR_MASK RUBY_ECONV_STATEFUL_DECORATOR_MASK
24659#define ECONV_XML_ATTR_QUOTE_DECORATOR RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR
24660#define ECONV_DEFAULT_NEWLINE_DECORATOR RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR
24661#define ECONV_PARTIAL_INPUT RUBY_ECONV_PARTIAL_INPUT
24662#define ECONV_AFTER_OUTPUT RUBY_ECONV_AFTER_OUTPUT
24663#pragma GCC visibility pop
24664#define STR_NOEMBED FL_USER1
24665#define STR_SHARED FL_USER2
24666#undef rb_fstring_cstr
24667#pragma GCC visibility push(default)
24668#pragma GCC visibility pop
24669#pragma GCC visibility push(default)
24670#pragma GCC visibility pop
24671#define rb_fstring_lit(str) rb_fstring_new((str), rb_strlen_lit(str))
24672#define rb_fstring_literal(str) rb_fstring_lit(str)
24673#define rb_fstring_enc_lit(str,enc) rb_fstring_enc_new((str), rb_strlen_lit(str), (enc))
24674#define rb_fstring_enc_literal(str,enc) rb_fstring_enc_lit(str, enc)
24675#define rb_fstring_cstr(str) (__builtin_constant_p(str) ? rb_fstring_new((str), (long)strlen(str)) : (rb_fstring_cstr)(str))
24676#undef Check_Type
24677#define rb_raise_static(e,m) rb_raise_cstr_i((e), rb_str_new_static((m), rb_strlen_lit(m)))
24678#define rb_sys_fail_path(path) rb_sys_fail_path_in(RUBY_FUNCTION_NAME_STRING, path)
24679#define rb_syserr_fail_path(err,path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
24680#define rb_syserr_new_path(err,path) rb_syserr_new_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
24681#define rb_typeddata_is_instance_of rb_typeddata_is_instance_of_inline
24682#pragma GCC visibility push(default)
24683#pragma GCC visibility pop
24684#define INTERNAL_EVAL_H
24685#define id_signo ruby_static_id_signo
24686#define id_status ruby_static_id_status
24687#define INTERNAL_INITS_H
24688#define INTERNAL_OBJECT_H
24689#define INTERNAL_CLASS_H
24690#define RUBY_ID_TABLE_H 1
24691#define RCLASS_EXT(c) (RCLASS(c)->ptr)
24692#define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
24693#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
24694#define RCLASS_M_TBL(c) (RCLASS_EXT(c)->m_tbl)
24695#define RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl)
24696#define RCLASS_CC_TBL(c) (RCLASS_EXT(c)->cc_tbl)
24697#define RCLASS_IV_INDEX_TBL(c) (RCLASS_EXT(c)->iv_index_tbl)
24698#define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin_)
24699#define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
24700#define RCLASS_SERIAL(c) (RCLASS(c)->class_serial)
24701#define RCLASS_INCLUDER(c) (RCLASS_EXT(c)->includer)
24702#define RICLASS_IS_ORIGIN FL_USER5
24703#define RCLASS_CLONED FL_USER6
24704#define RICLASS_ORIGIN_SHARED_MTBL FL_USER8
24705#pragma GCC visibility push(default)
24706#pragma GCC visibility pop
24707#pragma GCC diagnostic push
24708#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
24709#pragma GCC diagnostic pop
24710#pragma GCC diagnostic push
24711#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
24712#pragma GCC diagnostic pop
24713#pragma GCC diagnostic push
24714#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
24715#pragma GCC diagnostic pop
24716#pragma GCC visibility push(default)
24717#pragma GCC visibility pop
24718#pragma GCC visibility push(default)
24719#pragma GCC visibility pop
24720#define ROBJECT_IV_INDEX_TBL ROBJECT_IV_INDEX_TBL_inline
24721#define INTERNAL_PARSE_H
24722#pragma GCC visibility push(default)
24723#pragma GCC visibility pop
24724#define INTERNAL_PROC_H
24725#pragma GCC visibility push(default)
24726#pragma GCC visibility pop
24727#define INTERNAL_RE_H
24728#pragma GCC visibility push(default)
24729#pragma GCC visibility pop
24730#define INTERNAL_SYMBOL_H
24731#undef rb_sym_intern_ascii_cstr
24732#define rb_sym_intern_ascii_cstr(ptr) (__builtin_constant_p(ptr) ? rb_sym_intern_ascii((ptr), (long)strlen(ptr)) : rb_sym_intern_ascii_cstr(ptr))
24733#define INTERNAL_SANITIZERS_H
24734#define __MEMCHECK_H
24735#define __VALGRIND_H
24736#define __VALGRIND_MAJOR__ 3
24737#define __VALGRIND_MINOR__ 17
24738#undef PLAT_x86_darwin
24739#undef PLAT_amd64_darwin
24740#undef PLAT_x86_win32
24741#undef PLAT_amd64_win64
24742#undef PLAT_x86_linux
24743#undef PLAT_amd64_linux
24744#undef PLAT_ppc32_linux
24745#undef PLAT_ppc64be_linux
24746#undef PLAT_ppc64le_linux
24747#undef PLAT_arm_linux
24748#undef PLAT_arm64_linux
24749#undef PLAT_s390x_linux
24750#undef PLAT_mips32_linux
24751#undef PLAT_mips64_linux
24752#undef PLAT_nanomips_linux
24753#undef PLAT_x86_solaris
24754#undef PLAT_amd64_solaris
24755#define PLAT_amd64_linux 1
24756#define VALGRIND_DO_CLIENT_REQUEST(_zzq_rlval,_zzq_default,_zzq_request,_zzq_arg1,_zzq_arg2,_zzq_arg3,_zzq_arg4,_zzq_arg5) do { (_zzq_rlval) = VALGRIND_DO_CLIENT_REQUEST_EXPR((_zzq_default), (_zzq_request), (_zzq_arg1), (_zzq_arg2), (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); } while (0)
24757#define VALGRIND_DO_CLIENT_REQUEST_STMT(_zzq_request,_zzq_arg1,_zzq_arg2,_zzq_arg3,_zzq_arg4,_zzq_arg5) do { (void) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, (_zzq_request), (_zzq_arg1), (_zzq_arg2), (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); } while (0)
24758#define __SPECIAL_INSTRUCTION_PREAMBLE "rolq $3, %%rdi ; rolq $13, %%rdi\n\t" "rolq $61, %%rdi ; rolq $51, %%rdi\n\t"
24759#define VALGRIND_DO_CLIENT_REQUEST_EXPR(_zzq_default,_zzq_request,_zzq_arg1,_zzq_arg2,_zzq_arg3,_zzq_arg4,_zzq_arg5) __extension__ ({ volatile unsigned long int _zzq_args[6]; volatile unsigned long int _zzq_result; _zzq_args[0] = (unsigned long int)(_zzq_request); _zzq_args[1] = (unsigned long int)(_zzq_arg1); _zzq_args[2] = (unsigned long int)(_zzq_arg2); _zzq_args[3] = (unsigned long int)(_zzq_arg3); _zzq_args[4] = (unsigned long int)(_zzq_arg4); _zzq_args[5] = (unsigned long int)(_zzq_arg5); __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rbx,%%rbx" : "=d" (_zzq_result) : "a" (&_zzq_args[0]), "0" (_zzq_default) : "cc", "memory" ); _zzq_result; })
24760#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) { volatile OrigFn* _zzq_orig = &(_zzq_rlval); volatile unsigned long int __addr; __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rcx,%%rcx" : "=a" (__addr) : : "cc", "memory" ); _zzq_orig->nraddr = __addr; }
24761#define VALGRIND_CALL_NOREDIR_RAX __SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rdx,%%rdx\n\t"
24762#define VALGRIND_VEX_INJECT_IR() do { __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rdi,%%rdi\n\t" : : : "cc", "memory" ); } while (0)
24763#define VG_CONCAT4(_aa,_bb,_cc,_dd) _aa ##_bb ##_cc ##_dd
24764#define I_WRAP_SONAME_FNNAME_ZU(soname,fnname) VG_CONCAT4(_vgw00000ZU_,soname,_,fnname)
24765#define I_WRAP_SONAME_FNNAME_ZZ(soname,fnname) VG_CONCAT4(_vgw00000ZZ_,soname,_,fnname)
24766#define VALGRIND_GET_ORIG_FN(_lval) VALGRIND_GET_NR_CONTEXT(_lval)
24767#define I_REPLACE_SONAME_FNNAME_ZU(soname,fnname) VG_CONCAT4(_vgr00000ZU_,soname,_,fnname)
24768#define I_REPLACE_SONAME_FNNAME_ZZ(soname,fnname) VG_CONCAT4(_vgr00000ZZ_,soname,_,fnname)
24769#define CALL_FN_v_v(fnptr) do { volatile unsigned long _junk; CALL_FN_W_v(_junk,fnptr); } while (0)
24770#define CALL_FN_v_W(fnptr,arg1) do { volatile unsigned long _junk; CALL_FN_W_W(_junk,fnptr,arg1); } while (0)
24771#define CALL_FN_v_WW(fnptr,arg1,arg2) do { volatile unsigned long _junk; CALL_FN_W_WW(_junk,fnptr,arg1,arg2); } while (0)
24772#define CALL_FN_v_WWW(fnptr,arg1,arg2,arg3) do { volatile unsigned long _junk; CALL_FN_W_WWW(_junk,fnptr,arg1,arg2,arg3); } while (0)
24773#define CALL_FN_v_WWWW(fnptr,arg1,arg2,arg3,arg4) do { volatile unsigned long _junk; CALL_FN_W_WWWW(_junk,fnptr,arg1,arg2,arg3,arg4); } while (0)
24774#define CALL_FN_v_5W(fnptr,arg1,arg2,arg3,arg4,arg5) do { volatile unsigned long _junk; CALL_FN_W_5W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5); } while (0)
24775#define CALL_FN_v_6W(fnptr,arg1,arg2,arg3,arg4,arg5,arg6) do { volatile unsigned long _junk; CALL_FN_W_6W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6); } while (0)
24776#define CALL_FN_v_7W(fnptr,arg1,arg2,arg3,arg4,arg5,arg6,arg7) do { volatile unsigned long _junk; CALL_FN_W_7W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6,arg7); } while (0)
24777#define __CALLER_SAVED_REGS "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10", "r11"
24778#define __FRAME_POINTER ,"r"(__builtin_dwarf_cfa())
24779#define VALGRIND_CFI_PROLOGUE "movq %%rbp, %%r15\n\t" "movq %2, %%rbp\n\t" ".cfi_remember_state\n\t" ".cfi_def_cfa rbp, 0\n\t"
24780#define VALGRIND_CFI_EPILOGUE "movq %%r15, %%rbp\n\t" ".cfi_restore_state\n\t"
24781#define VALGRIND_ALIGN_STACK "movq %%rsp,%%r14\n\t" "andq $0xfffffffffffffff0,%%rsp\n\t"
24782#define VALGRIND_RESTORE_STACK "movq %%r14,%%rsp\n\t"
24783#define CALL_FN_W_v(lval,orig) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[1]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
24784#define CALL_FN_W_W(lval,orig,arg1) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[2]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
24785#define CALL_FN_W_WW(lval,orig,arg1,arg2) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[3]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
24786#define CALL_FN_W_WWW(lval,orig,arg1,arg2,arg3) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[4]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
24787#define CALL_FN_W_WWWW(lval,orig,arg1,arg2,arg3,arg4) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[5]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
24788#define CALL_FN_W_5W(lval,orig,arg1,arg2,arg3,arg4,arg5) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[6]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
24789#define CALL_FN_W_6W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[7]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
24790#define CALL_FN_W_7W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[8]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $136,%%rsp\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
24791#define CALL_FN_W_8W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[9]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
24792#define CALL_FN_W_9W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[10]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $136,%%rsp\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
24793#define CALL_FN_W_10W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[11]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); _argvec[10] = (unsigned long)(arg10); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "pushq 80(%%rax)\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
24794#define CALL_FN_W_11W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[12]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); _argvec[10] = (unsigned long)(arg10); _argvec[11] = (unsigned long)(arg11); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $136,%%rsp\n\t" "pushq 88(%%rax)\n\t" "pushq 80(%%rax)\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
24795#define CALL_FN_W_12W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[13]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); _argvec[10] = (unsigned long)(arg10); _argvec[11] = (unsigned long)(arg11); _argvec[12] = (unsigned long)(arg12); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "pushq 96(%%rax)\n\t" "pushq 88(%%rax)\n\t" "pushq 80(%%rax)\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
24796#define VG_USERREQ_TOOL_BASE(a,b) ((unsigned int)(((a)&0xff) << 24 | ((b)&0xff) << 16))
24797#define VG_IS_TOOL_USERREQ(a,b,v) (VG_USERREQ_TOOL_BASE(a,b) == ((v) & 0xffff0000))
24798#define RUNNING_ON_VALGRIND (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__RUNNING_ON_VALGRIND, 0, 0, 0, 0, 0)
24799#define VALGRIND_DISCARD_TRANSLATIONS(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DISCARD_TRANSLATIONS, _qzz_addr, _qzz_len, 0, 0, 0)
24800#define VALGRIND_INNER_THREADS(_qzz_addr) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__INNER_THREADS, _qzz_addr, 0, 0, 0, 0)
24801#define VALGRIND_NON_SIMD_CALL0(_qyy_fn) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL0, _qyy_fn, 0, 0, 0, 0)
24802#define VALGRIND_NON_SIMD_CALL1(_qyy_fn,_qyy_arg1) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL1, _qyy_fn, _qyy_arg1, 0, 0, 0)
24803#define VALGRIND_NON_SIMD_CALL2(_qyy_fn,_qyy_arg1,_qyy_arg2) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL2, _qyy_fn, _qyy_arg1, _qyy_arg2, 0, 0)
24804#define VALGRIND_NON_SIMD_CALL3(_qyy_fn,_qyy_arg1,_qyy_arg2,_qyy_arg3) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL3, _qyy_fn, _qyy_arg1, _qyy_arg2, _qyy_arg3, 0)
24805#define VALGRIND_COUNT_ERRORS (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR( 0 , VG_USERREQ__COUNT_ERRORS, 0, 0, 0, 0, 0)
24806#define VALGRIND_MALLOCLIKE_BLOCK(addr,sizeB,rzB,is_zeroed) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MALLOCLIKE_BLOCK, addr, sizeB, rzB, is_zeroed, 0)
24807#define VALGRIND_RESIZEINPLACE_BLOCK(addr,oldSizeB,newSizeB,rzB) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__RESIZEINPLACE_BLOCK, addr, oldSizeB, newSizeB, rzB, 0)
24808#define VALGRIND_FREELIKE_BLOCK(addr,rzB) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__FREELIKE_BLOCK, addr, rzB, 0, 0, 0)
24809#define VALGRIND_CREATE_MEMPOOL(pool,rzB,is_zeroed) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CREATE_MEMPOOL, pool, rzB, is_zeroed, 0, 0)
24810#define VALGRIND_MEMPOOL_AUTO_FREE 1
24811#define VALGRIND_MEMPOOL_METAPOOL 2
24812#define VALGRIND_CREATE_MEMPOOL_EXT(pool,rzB,is_zeroed,flags) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CREATE_MEMPOOL, pool, rzB, is_zeroed, flags, 0)
24813#define VALGRIND_DESTROY_MEMPOOL(pool) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DESTROY_MEMPOOL, pool, 0, 0, 0, 0)
24814#define VALGRIND_MEMPOOL_ALLOC(pool,addr,size) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_ALLOC, pool, addr, size, 0, 0)
24815#define VALGRIND_MEMPOOL_FREE(pool,addr) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_FREE, pool, addr, 0, 0, 0)
24816#define VALGRIND_MEMPOOL_TRIM(pool,addr,size) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_TRIM, pool, addr, size, 0, 0)
24817#define VALGRIND_MOVE_MEMPOOL(poolA,poolB) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MOVE_MEMPOOL, poolA, poolB, 0, 0, 0)
24818#define VALGRIND_MEMPOOL_CHANGE(pool,addrA,addrB,size) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_CHANGE, pool, addrA, addrB, size, 0)
24819#define VALGRIND_MEMPOOL_EXISTS(pool) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__MEMPOOL_EXISTS, pool, 0, 0, 0, 0)
24820#define VALGRIND_STACK_REGISTER(start,end) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__STACK_REGISTER, start, end, 0, 0, 0)
24821#define VALGRIND_STACK_DEREGISTER(id) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_DEREGISTER, id, 0, 0, 0, 0)
24822#define VALGRIND_STACK_CHANGE(id,start,end) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_CHANGE, id, start, end, 0, 0)
24823#define VALGRIND_LOAD_PDB_DEBUGINFO(fd,ptr,total_size,delta) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__LOAD_PDB_DEBUGINFO, fd, ptr, total_size, delta, 0)
24824#define VALGRIND_MAP_IP_TO_SRCLOC(addr,buf64) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__MAP_IP_TO_SRCLOC, addr, buf64, 0, 0, 0)
24825#define VALGRIND_DISABLE_ERROR_REPORTING VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, 1, 0, 0, 0, 0)
24826#define VALGRIND_ENABLE_ERROR_REPORTING VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, -1, 0, 0, 0, 0)
24827#define VALGRIND_MONITOR_COMMAND(command) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__GDB_MONITOR_COMMAND, command, 0, 0, 0, 0)
24828#define VALGRIND_CLO_CHANGE(option) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CLO_CHANGE, option, 0, 0, 0, 0)
24829#undef PLAT_x86_darwin
24830#undef PLAT_amd64_darwin
24831#undef PLAT_x86_win32
24832#undef PLAT_amd64_win64
24833#undef PLAT_x86_linux
24834#undef PLAT_amd64_linux
24835#undef PLAT_ppc32_linux
24836#undef PLAT_ppc64be_linux
24837#undef PLAT_ppc64le_linux
24838#undef PLAT_arm_linux
24839#undef PLAT_s390x_linux
24840#undef PLAT_mips32_linux
24841#undef PLAT_mips64_linux
24842#undef PLAT_nanomips_linux
24843#undef PLAT_x86_solaris
24844#undef PLAT_amd64_solaris
24845#define VALGRIND_MAKE_MEM_NOACCESS(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_NOACCESS, (_qzz_addr), (_qzz_len), 0, 0, 0)
24846#define VALGRIND_MAKE_MEM_UNDEFINED(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_UNDEFINED, (_qzz_addr), (_qzz_len), 0, 0, 0)
24847#define VALGRIND_MAKE_MEM_DEFINED(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_DEFINED, (_qzz_addr), (_qzz_len), 0, 0, 0)
24848#define VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE, (_qzz_addr), (_qzz_len), 0, 0, 0)
24849#define VALGRIND_CREATE_BLOCK(_qzz_addr,_qzz_len,_qzz_desc) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CREATE_BLOCK, (_qzz_addr), (_qzz_len), (_qzz_desc), 0, 0)
24850#define VALGRIND_DISCARD(_qzz_blkindex) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__DISCARD, 0, (_qzz_blkindex), 0, 0, 0)
24851#define VALGRIND_CHECK_MEM_IS_ADDRESSABLE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE, (_qzz_addr), (_qzz_len), 0, 0, 0)
24852#define VALGRIND_CHECK_MEM_IS_DEFINED(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__CHECK_MEM_IS_DEFINED, (_qzz_addr), (_qzz_len), 0, 0, 0)
24853#define VALGRIND_CHECK_VALUE_IS_DEFINED(__lvalue) VALGRIND_CHECK_MEM_IS_DEFINED( (volatile unsigned char *)&(__lvalue), (unsigned long)(sizeof (__lvalue)))
24854#define VALGRIND_DO_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 0, 0, 0, 0, 0)
24855#define VALGRIND_DO_ADDED_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 0, 1, 0, 0, 0)
24856#define VALGRIND_DO_CHANGED_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 0, 2, 0, 0, 0)
24857#define VALGRIND_DO_QUICK_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 1, 0, 0, 0, 0)
24858#define VALGRIND_COUNT_LEAKS(leaked,dubious,reachable,suppressed) { unsigned long _qzz_leaked = 0, _qzz_dubious = 0; unsigned long _qzz_reachable = 0, _qzz_suppressed = 0; VALGRIND_DO_CLIENT_REQUEST_STMT( VG_USERREQ__COUNT_LEAKS, &_qzz_leaked, &_qzz_dubious, &_qzz_reachable, &_qzz_suppressed, 0); leaked = _qzz_leaked; dubious = _qzz_dubious; reachable = _qzz_reachable; suppressed = _qzz_suppressed; }
24859#define VALGRIND_COUNT_LEAK_BLOCKS(leaked,dubious,reachable,suppressed) { unsigned long _qzz_leaked = 0, _qzz_dubious = 0; unsigned long _qzz_reachable = 0, _qzz_suppressed = 0; VALGRIND_DO_CLIENT_REQUEST_STMT( VG_USERREQ__COUNT_LEAK_BLOCKS, &_qzz_leaked, &_qzz_dubious, &_qzz_reachable, &_qzz_suppressed, 0); leaked = _qzz_leaked; dubious = _qzz_dubious; reachable = _qzz_reachable; suppressed = _qzz_suppressed; }
24860#define VALGRIND_GET_VBITS(zza,zzvbits,zznbytes) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__GET_VBITS, (const char*)(zza), (char*)(zzvbits), (zznbytes), 0, 0)
24861#define VALGRIND_SET_VBITS(zza,zzvbits,zznbytes) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__SET_VBITS, (const char*)(zza), (const char*)(zzvbits), (zznbytes), 0, 0 )
24862#define VALGRIND_DISABLE_ADDR_ERROR_REPORTING_IN_RANGE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__DISABLE_ADDR_ERROR_REPORTING_IN_RANGE, (_qzz_addr), (_qzz_len), 0, 0, 0)
24863#define VALGRIND_ENABLE_ADDR_ERROR_REPORTING_IN_RANGE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__ENABLE_ADDR_ERROR_REPORTING_IN_RANGE, (_qzz_addr), (_qzz_len), 0, 0, 0)
24864#define SANITIZER_ASAN_INTERFACE_H
24865#define SANITIZER_COMMON_INTERFACE_DEFS_H
24866#define ASAN_POISON_MEMORY_REGION(addr,size) ((void)(addr), (void)(size))
24867#define ASAN_UNPOISON_MEMORY_REGION(addr,size) ((void)(addr), (void)(size))
24868#define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) NO_SANITIZE_ADDRESS(NOINLINE(x))
24869#undef NO_SANITIZE
24870#define NO_SANITIZE(x,y) COMPILER_WARNING_PUSH; COMPILER_WARNING_IGNORED(-Wattributes); __attribute__((__no_sanitize__(x))) y; COMPILER_WARNING_POP
24871#define __asan_poison_memory_region(x,y)
24872#define __asan_unpoison_memory_region(x,y)
24873#define __asan_region_is_poisoned(x,y) 0
24874#define __msan_allocated_memory(x,y) ((void)(x), (void)(y))
24875#define __msan_poison(x,y) ((void)(x), (void)(y))
24876#define __msan_unpoison(x,y) ((void)(x), (void)(y))
24877#define __msan_unpoison_string(x) ((void)(x))
24878#define RUBY_ISEQ_H 1
24879#define ISEQ_MAJOR_VERSION ((unsigned int)ruby_api_version[0])
24880#define ISEQ_MINOR_VERSION ((unsigned int)ruby_api_version[1])
24881#define ISEQ_COVERAGE(iseq) iseq->body->variable.coverage
24882#define ISEQ_COVERAGE_SET(iseq,cov) RB_OBJ_WRITE(iseq, &iseq->body->variable.coverage, cov)
24883#define ISEQ_LINE_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_LINES)
24884#define ISEQ_BRANCH_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_BRANCHES)
24885#define ISEQ_PC2BRANCHINDEX(iseq) iseq->body->variable.pc2branchindex
24886#define ISEQ_PC2BRANCHINDEX_SET(iseq,h) RB_OBJ_WRITE(iseq, &iseq->body->variable.pc2branchindex, h)
24887#define ISEQ_FLIP_CNT(iseq) (iseq)->body->variable.flip_count
24888#define ISEQ_TRACE_EVENTS (RUBY_EVENT_LINE | RUBY_EVENT_CLASS | RUBY_EVENT_END | RUBY_EVENT_CALL | RUBY_EVENT_RETURN| RUBY_EVENT_B_CALL| RUBY_EVENT_B_RETURN| RUBY_EVENT_COVERAGE_LINE| RUBY_EVENT_COVERAGE_BRANCH)
24889#define ISEQ_NOT_LOADED_YET IMEMO_FL_USER1
24890#define ISEQ_USE_COMPILE_DATA IMEMO_FL_USER2
24891#define ISEQ_TRANSLATED IMEMO_FL_USER3
24892#define ISEQ_MARKABLE_ISEQ IMEMO_FL_USER4
24893#define ISEQ_EXECUTABLE_P(iseq) (FL_TEST_RAW(((VALUE)iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0)
24894#pragma GCC visibility push(default)
24895#define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)
24896#pragma GCC visibility pop
24897#define RUBY_MJIT_H 1
24898#define USE_DEBUG_COUNTER 0
24899#define RUBY_DEBUG_COUNTER_H 1
24900#define RB_DEBUG_COUNTER(name) RB_DEBUG_COUNTER_ ##name,
24901#undef RB_DEBUG_COUNTER
24902#define RB_DEBUG_COUNTER_INC(type) ((void)0)
24903#define RB_DEBUG_COUNTER_INC_UNLESS(type,cond) (!!(cond))
24904#define RB_DEBUG_COUNTER_INC_IF(type,cond) (!!(cond))
24905#define RB_DEBUG_COUNTER_ADD(type,num) ((void)0)
24906#define RB_DEBUG_COUNTER_SETMAX(type,num) 0
24907#pragma GCC visibility push(default)
24908#pragma GCC visibility pop
24909#define RUBY_H 1
24910#define HAVE_RUBY_ATOMIC_H 1
24911#define HAVE_RUBY_DEBUG_H 1
24912#define HAVE_RUBY_DEFINES_H 1
24913#define HAVE_RUBY_ENCODING_H 1
24914#define HAVE_RUBY_INTERN_H 1
24915#define HAVE_RUBY_IO_H 1
24916#define HAVE_RUBY_MEMORY_VIEW_H 1
24917#define HAVE_RUBY_MISSING_H 1
24918#define HAVE_RUBY_ONIGMO_H 1
24919#define HAVE_RUBY_ONIGURUMA_H 1
24920#define HAVE_RUBY_RACTOR_H 1
24921#define HAVE_RUBY_RANDOM_H 1
24922#define HAVE_RUBY_RE_H 1
24923#define HAVE_RUBY_REGEX_H 1
24924#define HAVE_RUBY_RUBY_H 1
24925#define HAVE_RUBY_ST_H 1
24926#define HAVE_RUBY_THREAD_H 1
24927#define HAVE_RUBY_THREAD_NATIVE_H 1
24928#define HAVE_RUBY_UTIL_H 1
24929#define HAVE_RUBY_VERSION_H 1
24930#define HAVE_RUBY_VM_H 1
24931#pragma GCC visibility push(default)
24932#pragma GCC visibility pop
24933#define JIT_ISEQ_SIZE_THRESHOLD 1000
24934#define mjit_enabled true
24935#define RUBY_VM_H 1
24936#pragma GCC visibility push(default)
24937#pragma GCC visibility pop
24938#define RUBY_VM_CALLINFO_H
24939#define VM_CALL_ARGS_SPLAT (0x01 << VM_CALL_ARGS_SPLAT_bit)
24940#define VM_CALL_ARGS_BLOCKARG (0x01 << VM_CALL_ARGS_BLOCKARG_bit)
24941#define VM_CALL_FCALL (0x01 << VM_CALL_FCALL_bit)
24942#define VM_CALL_VCALL (0x01 << VM_CALL_VCALL_bit)
24943#define VM_CALL_ARGS_SIMPLE (0x01 << VM_CALL_ARGS_SIMPLE_bit)
24944#define VM_CALL_BLOCKISEQ (0x01 << VM_CALL_BLOCKISEQ_bit)
24945#define VM_CALL_KWARG (0x01 << VM_CALL_KWARG_bit)
24946#define VM_CALL_KW_SPLAT (0x01 << VM_CALL_KW_SPLAT_bit)
24947#define VM_CALL_TAILCALL (0x01 << VM_CALL_TAILCALL_bit)
24948#define VM_CALL_SUPER (0x01 << VM_CALL_SUPER_bit)
24949#define VM_CALL_ZSUPER (0x01 << VM_CALL_ZSUPER_bit)
24950#define VM_CALL_OPT_SEND (0x01 << VM_CALL_OPT_SEND_bit)
24951#define VM_CALL_KW_SPLAT_MUT (0x01 << VM_CALL_KW_SPLAT_MUT_bit)
24952#define USE_EMBED_CI 1
24953#define CI_EMBED_TAG_bits 1
24954#define CI_EMBED_ARGC_bits 15
24955#define CI_EMBED_FLAG_bits 16
24956#define CI_EMBED_ID_bits 32
24957#define CI_EMBED_FLAG 0x01
24958#define CI_EMBED_ARGC_SHFT (CI_EMBED_TAG_bits)
24959#define CI_EMBED_ARGC_MASK ((((VALUE)1)<<CI_EMBED_ARGC_bits) - 1)
24960#define CI_EMBED_FLAG_SHFT (CI_EMBED_TAG_bits + CI_EMBED_ARGC_bits)
24961#define CI_EMBED_FLAG_MASK ((((VALUE)1)<<CI_EMBED_FLAG_bits) - 1)
24962#define CI_EMBED_ID_SHFT (CI_EMBED_TAG_bits + CI_EMBED_ARGC_bits + CI_EMBED_FLAG_bits)
24963#define CI_EMBED_ID_MASK ((((VALUE)1)<<CI_EMBED_ID_bits) - 1)
24964#define vm_ci_new(mid,flag,argc,kwarg) vm_ci_new_(mid, flag, argc, kwarg, __FILE__, __LINE__)
24965#define vm_ci_new_runtime(mid,flag,argc,kwarg) vm_ci_new_runtime_(mid, flag, argc, kwarg, __FILE__, __LINE__)
24966#define VM_CI_EMBEDDABLE_P(mid,flag,argc,kwarg) (((mid ) & ~CI_EMBED_ID_MASK) ? false : ((flag) & ~CI_EMBED_FLAG_MASK) ? false : ((argc) & ~CI_EMBED_ARGC_MASK) ? false : (kwarg) ? false : true)
24967#define vm_ci_new_id(mid,flag,argc,must_zero) ((const struct rb_callinfo *) ((((VALUE)(mid )) << CI_EMBED_ID_SHFT) | (((VALUE)(flag)) << CI_EMBED_FLAG_SHFT) | (((VALUE)(argc)) << CI_EMBED_ARGC_SHFT) | RUBY_FIXNUM_FLAG))
24968#define VM_CALLINFO_NOT_UNDER_GC IMEMO_FL_USER0
24969#define VM_CI_ON_STACK(mid_,flags_,argc_,kwarg_) (struct rb_callinfo) { .flags = T_IMEMO | (imemo_callinfo << FL_USHIFT) | VM_CALLINFO_NOT_UNDER_GC, .mid = mid_, .flag = flags_, .argc = argc_, .kwarg = kwarg_, }
24970#define VM_CALLCACHE_UNMARKABLE IMEMO_FL_USER0
24971#define VM_CC_ON_STACK(clazz,call,aux,cme) (struct rb_callcache) { .flags = T_IMEMO | (imemo_callcache << FL_USHIFT) | VM_CALLCACHE_UNMARKABLE, .klass = clazz, .cme_ = cme, .call_ = call, .aux_ = aux, }
24972#define vm_cc_empty() rb_vm_empty_cc()
24973#define RUBY_DEBUG_H
24974#pragma GCC visibility push(default)
24975#define dpv(h,v) ruby_debug_print_value(-1, 0, (h), (v))
24976#define dp(v) ruby_debug_print_value(-1, 0, "", (v))
24977#define dpi(i) ruby_debug_print_id(-1, 0, "", (i))
24978#define dpn(n) ruby_debug_print_node(-1, 0, "", (n))
24979#pragma GCC visibility pop
24980#define _RUBY_DEBUG_LOG(fmt,...) ruby_debug_log(__FILE__, __LINE__, __func__, fmt, __VA_ARGS__)
24981#define RUBY_DEBUG_LOG(fmt,...)
24982#define RUBY_DEBUG_LOG2(file,line,fmt,...)
24983#define RUBY_VM_EXEC_H
24984#define debugs
24985#define DEBUG_ENTER_INSN(insn)
24986#define DEBUG_END_INSN()
24987#define throwdebug if(0)printf
24988#define USE_INSNS_COUNTER 0
24989#define LABEL(x) INSN_LABEL_ ##x
24990#define ELABEL(x) INSN_ELABEL_ ##x
24991#define LABEL_PTR(x) RB_GNUC_EXTENSION(&&LABEL(x))
24992#define INSN_ENTRY_SIG(insn) if (0) fprintf(stderr, "exec: %s@(%"PRIdPTRDIFF", %"PRIdPTRDIFF")@%s:%u\n", #insn, (reg_pc - reg_cfp->iseq->body->iseq_encoded), (reg_cfp->pc - reg_cfp->iseq->body->iseq_encoded), RSTRING_PTR(rb_iseq_path(reg_cfp->iseq)), rb_iseq_line_no(reg_cfp->iseq, reg_pc - reg_cfp->iseq->body->iseq_encoded)); if (USE_INSNS_COUNTER) vm_insns_counter_count_insn(BIN(insn));
24993#define INSN_DISPATCH_SIG(insn)
24994#define INSN_ENTRY(insn) LABEL(insn): INSN_ENTRY_SIG(insn);
24995#define TC_DISPATCH(insn) INSN_DISPATCH_SIG(insn); RB_GNUC_EXTENSION_BLOCK(goto *(void const *)GET_CURRENT_INSN()); ;
24996#define END_INSN(insn) DEBUG_END_INSN(); TC_DISPATCH(insn);
24997#define INSN_DISPATCH() TC_DISPATCH(__START__) {
24998#define END_INSNS_DISPATCH() rb_bug("unknown insn: %"PRIdVALUE, GET_CURRENT_INSN()); }
24999#define NEXT_INSN() TC_DISPATCH(__NEXT_INSN__)
25000#define START_OF_ORIGINAL_INSN(x) start_of_ ##x:
25001#define DISPATCH_ORIGINAL_INSN(x) goto start_of_ ##x;
25002#define VM_SP_CNT(ec,sp) ((sp) - (ec)->vm_stack)
25003#define THROW_EXCEPTION(exc) do { ec->errinfo = (VALUE)(exc); EC_JUMP_TAG(ec, ec->tag->state); } while (0)
25004#define SCREG(r) (reg_ ##r)
25005#define VM_DEBUG_STACKOVERFLOW 0
25006#define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp,margin)
25007#define INSN_LABEL2(insn,name) INSN_LABEL_ ## insn ## _ ## name
25008#define INSN_LABEL(x) INSN_LABEL2(NAME_OF_CURRENT_INSN, x)
25009#define RUBY_INSNHELPER_H
25010#pragma GCC visibility push(default)
25011#pragma GCC visibility pop
25012#define COLLECT_USAGE_INSN(insn)
25013#define COLLECT_USAGE_OPERAND(insn,n,op)
25014#define COLLECT_USAGE_REGISTER(reg,s)
25015#define PUSH(x) (SET_SV(x), INC_SP(1))
25016#define TOPN(n) (*(GET_SP()-(n)-1))
25017#define POPN(n) (DEC_SP(n))
25018#define POP() (DEC_SP(1))
25019#define STACK_ADDR_FROM_TOP(n) (GET_SP()-(n))
25020#define VM_REG_CFP (reg_cfp)
25021#define VM_REG_PC (VM_REG_CFP->pc)
25022#define VM_REG_SP (VM_REG_CFP->sp)
25023#define VM_REG_EP (VM_REG_CFP->ep)
25024#define RESTORE_REGS() do { VM_REG_CFP = ec->cfp; } while (0)
25025#define COLLECT_USAGE_REGISTER_HELPER(a,b,v) (v)
25026#define GET_PC() (COLLECT_USAGE_REGISTER_HELPER(PC, GET, VM_REG_PC))
25027#define SET_PC(x) (VM_REG_PC = (COLLECT_USAGE_REGISTER_HELPER(PC, SET, (x))))
25028#define GET_CURRENT_INSN() (*GET_PC())
25029#define GET_OPERAND(n) (GET_PC()[(n)])
25030#define ADD_PC(n) (SET_PC(VM_REG_PC + (n)))
25031#define JUMP(dst) (SET_PC(VM_REG_PC + (dst)))
25032#define GET_CFP() (COLLECT_USAGE_REGISTER_HELPER(CFP, GET, VM_REG_CFP))
25033#define GET_EP() (COLLECT_USAGE_REGISTER_HELPER(EP, GET, VM_REG_EP))
25034#define SET_EP(x) (VM_REG_EP = (COLLECT_USAGE_REGISTER_HELPER(EP, SET, (x))))
25035#define GET_LEP() (VM_EP_LEP(GET_EP()))
25036#define GET_SP() (COLLECT_USAGE_REGISTER_HELPER(SP, GET, VM_REG_SP))
25037#define SET_SP(x) (VM_REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
25038#define INC_SP(x) (VM_REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
25039#define DEC_SP(x) (VM_REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
25040#define SET_SV(x) (*GET_SP() = rb_ractor_confirm_belonging(x))
25041#define GET_ISEQ() (GET_CFP()->iseq)
25042#define GET_PREV_EP(ep) ((VALUE *)((ep)[VM_ENV_DATA_INDEX_SPECVAL] & ~0x03))
25043#define GET_SELF() (COLLECT_USAGE_REGISTER_HELPER(SELF, GET, GET_CFP()->self))
25044#define GET_BLOCK_HANDLER() (GET_LEP()[VM_ENV_DATA_INDEX_SPECVAL])
25045#define SETUP_CANARY(cond) if (cond) {} else {}
25046#define CHECK_CANARY(cond,insn) if (cond) {(void)(insn);}
25047#define PREV_CLASS_SERIAL() (ruby_vm_class_serial)
25048#define NEXT_CLASS_SERIAL() (++ruby_vm_class_serial)
25049#define GET_GLOBAL_CONSTANT_STATE() (ruby_vm_global_constant_state)
25050#define INC_GLOBAL_CONSTANT_STATE() (++ruby_vm_global_constant_state)
25051#define IS_ARGS_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_ARGS_SPLAT)
25052#define IS_ARGS_KEYWORD(ci) (vm_ci_flag(ci) & VM_CALL_KWARG)
25053#define IS_ARGS_KW_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT)
25054#define IS_ARGS_KW_OR_KW_SPLAT(ci) (vm_ci_flag(ci) & (VM_CALL_KWARG | VM_CALL_KW_SPLAT))
25055#define IS_ARGS_KW_SPLAT_MUT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT_MUT)
25056#define RUBY_RACTOR_H 1
25057#pragma GCC visibility push(default)
25058#define RB_RACTOR_LOCAL_STORAGE_TYPE_FREE (&rb_ractor_local_storage_type_free)
25059#pragma GCC visibility pop
25060#define RB_OBJ_SHAREABLE_P(obj) FL_TEST_RAW((obj), RUBY_FL_SHAREABLE)
25061#define RACTOR_CHECK_MODE (0 || VM_CHECK_MODE || RUBY_DEBUG)
25062#pragma GCC visibility push(default)
25063#pragma GCC visibility pop
25064#define rb_ractor_confirm_belonging(obj) obj
25065#define RUBY_VM_SYNC_H
25066#define LOCATION_ARGS void
25067#define LOCATION_PARAMS
25068#define APPEND_LOCATION_ARGS
25069#define APPEND_LOCATION_PARAMS
25070#define RB_VM_LOCKED_P() rb_vm_locked_p()
25071#define RB_VM_LOCK() rb_vm_lock(__FILE__, __LINE__)
25072#define RB_VM_UNLOCK() rb_vm_unlock(__FILE__, __LINE__)
25073#define RB_VM_LOCK_ENTER_CR_LEV(cr,levp) rb_vm_lock_enter_cr(cr, levp, __FILE__, __LINE__)
25074#define RB_VM_LOCK_LEAVE_CR_LEV(cr,levp) rb_vm_lock_leave_cr(cr, levp, __FILE__, __LINE__)
25075#define RB_VM_LOCK_ENTER_LEV(levp) rb_vm_lock_enter(levp, __FILE__, __LINE__)
25076#define RB_VM_LOCK_LEAVE_LEV(levp) rb_vm_lock_leave(levp, __FILE__, __LINE__)
25077#define RB_VM_LOCK_ENTER() { unsigned int _lev; RB_VM_LOCK_ENTER_LEV(&_lev);
25078#define RB_VM_LOCK_LEAVE() RB_VM_LOCK_LEAVE_LEV(&_lev); }
25079#define RB_VM_LOCK_ENTER_LEV_NB(levp) rb_vm_lock_enter_nb(levp, __FILE__, __LINE__)
25080#define RB_VM_LOCK_ENTER_NO_BARRIER() { unsigned int _lev; RB_VM_LOCK_ENTER_LEV_NB(&_lev);
25081#define RB_VM_LOCK_LEAVE_NO_BARRIER() RB_VM_LOCK_LEAVE_LEV(&_lev); }
25082#define ASSERT_vm_locking()
25083#define ASSERT_vm_unlocking()
25084#define BUILTIN_H_INCLUDED
25085#define RB_BUILTIN_FUNCTION(_i,_name,_fname,_arity,_compiler) { .name = #_name, .func_ptr = (void *)_fname, .argc = _arity, .index = _i, .compiler = _compiler, }
25086#define _PROBES_H
25087#define DTRACE_PROBES_DISABLED 1
25088#define RUBY_DTRACE_METHOD_ENTRY_ENABLED() 0
25089#define RUBY_DTRACE_METHOD_ENTRY(classname,methodname,filename,lineno) do {} while (0)
25090#define RUBY_DTRACE_METHOD_RETURN_ENABLED() 0
25091#define RUBY_DTRACE_METHOD_RETURN(classname,methodname,filename,lineno) do {} while (0)
25092#define RUBY_DTRACE_CMETHOD_ENTRY_ENABLED() 0
25093#define RUBY_DTRACE_CMETHOD_ENTRY(classname,methodname,filename,lineno) do {} while (0)
25094#define RUBY_DTRACE_CMETHOD_RETURN_ENABLED() 0
25095#define RUBY_DTRACE_CMETHOD_RETURN(classname,methodname,filename,lineno) do {} while (0)
25096#define RUBY_DTRACE_REQUIRE_ENTRY_ENABLED() 0
25097#define RUBY_DTRACE_REQUIRE_ENTRY(rquiredfile,filename,lineno) do {} while (0)
25098#define RUBY_DTRACE_REQUIRE_RETURN_ENABLED() 0
25099#define RUBY_DTRACE_REQUIRE_RETURN(requiredfile,filename,lineno) do {} while (0)
25100#define RUBY_DTRACE_FIND_REQUIRE_ENTRY_ENABLED() 0
25101#define RUBY_DTRACE_FIND_REQUIRE_ENTRY(requiredfile,filename,lineno) do {} while (0)
25102#define RUBY_DTRACE_FIND_REQUIRE_RETURN_ENABLED() 0
25103#define RUBY_DTRACE_FIND_REQUIRE_RETURN(requiredfile,filename,lineno) do {} while (0)
25104#define RUBY_DTRACE_LOAD_ENTRY_ENABLED() 0
25105#define RUBY_DTRACE_LOAD_ENTRY(loadedfile,filename,lineno) do {} while (0)
25106#define RUBY_DTRACE_LOAD_RETURN_ENABLED() 0
25107#define RUBY_DTRACE_LOAD_RETURN(loadedfile,filename,lineno) do {} while (0)
25108#define RUBY_DTRACE_RAISE_ENABLED() 0
25109#define RUBY_DTRACE_RAISE(classname,filename,lineno) do {} while (0)
25110#define RUBY_DTRACE_OBJECT_CREATE_ENABLED() 0
25111#define RUBY_DTRACE_OBJECT_CREATE(classname,filename,lineno) do {} while (0)
25112#define RUBY_DTRACE_ARRAY_CREATE_ENABLED() 0
25113#define RUBY_DTRACE_ARRAY_CREATE(length,filename,lineno) do {} while (0)
25114#define RUBY_DTRACE_HASH_CREATE_ENABLED() 0
25115#define RUBY_DTRACE_HASH_CREATE(length,filename,lineno) do {} while (0)
25116#define RUBY_DTRACE_STRING_CREATE_ENABLED() 0
25117#define RUBY_DTRACE_STRING_CREATE(length,filename,lineno) do {} while (0)
25118#define RUBY_DTRACE_SYMBOL_CREATE_ENABLED() 0
25119#define RUBY_DTRACE_SYMBOL_CREATE(str,filename,lineno) do {} while (0)
25120#define RUBY_DTRACE_PARSE_BEGIN_ENABLED() 0
25121#define RUBY_DTRACE_PARSE_BEGIN(sourcefile,lineno) do {} while (0)
25122#define RUBY_DTRACE_PARSE_END_ENABLED() 0
25123#define RUBY_DTRACE_PARSE_END(sourcefile,lineno) do {} while (0)
25124#define RUBY_DTRACE_INSN_ENABLED() 0
25125#define RUBY_DTRACE_INSN(insns_name) do {} while (0)
25126#define RUBY_DTRACE_INSN_OPERAND_ENABLED() 0
25127#define RUBY_DTRACE_INSN_OPERAND(val,insns_name) do {} while (0)
25128#define RUBY_DTRACE_GC_MARK_BEGIN_ENABLED() 0
25129#define RUBY_DTRACE_GC_MARK_BEGIN() do {} while (0)
25130#define RUBY_DTRACE_GC_MARK_END_ENABLED() 0
25131#define RUBY_DTRACE_GC_MARK_END() do {} while (0)
25132#define RUBY_DTRACE_GC_SWEEP_BEGIN_ENABLED() 0
25133#define RUBY_DTRACE_GC_SWEEP_BEGIN() do {} while (0)
25134#define RUBY_DTRACE_GC_SWEEP_END_ENABLED() 0
25135#define RUBY_DTRACE_GC_SWEEP_END() do {} while (0)
25136#define RUBY_PROBES_HELPER_H
25137#pragma GCC visibility push(default)
25138#pragma GCC visibility pop
25139#define RUBY_DTRACE_METHOD_HOOK(name,ec,klazz,id) do { if (UNLIKELY(RUBY_DTRACE_ ##name ##_ENABLED())) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, klazz, id, &args)) { RUBY_DTRACE_ ##name(args.classname, args.methodname, args.filename, args.line_no); } } } while (0)
25140#define RUBY_DTRACE_METHOD_ENTRY_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(METHOD_ENTRY, ec, klass, id)
25141#define RUBY_DTRACE_METHOD_RETURN_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(METHOD_RETURN, ec, klass, id)
25142#define RUBY_DTRACE_CMETHOD_ENTRY_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(CMETHOD_ENTRY, ec, klass, id)
25143#define RUBY_DTRACE_CMETHOD_RETURN_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(CMETHOD_RETURN, ec, klass, id)
25144#pragma GCC diagnostic push
25145#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25146#pragma GCC diagnostic pop
25147#define CONSTANT_H
25148#define RB_CONST_PRIVATE_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PRIVATE)
25149#define RB_CONST_PUBLIC_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PUBLIC)
25150#define RB_CONST_DEPRECATED_P(ce) ((ce)->flag & CONST_DEPRECATED)
25151#pragma GCC visibility push(default)
25152#pragma GCC visibility pop
25153#define INTERNAL_COMPAR_H
25154#define STRING_P(s) (RB_TYPE_P((s), T_STRING) && CLASS_OF(s) == rb_cString)
25155#define NEW_CMP_OPT_MEMO(type,value) NEW_PARTIAL_MEMO_FOR(type, value, cmp_opt)
25156#define CMP_OPTIMIZABLE_BIT(type) (1U << TOKEN_PASTE(cmp_opt_,type))
25157#define CMP_OPTIMIZABLE(data,type) (((data).opt_inited & CMP_OPTIMIZABLE_BIT(type)) ? ((data).opt_methods & CMP_OPTIMIZABLE_BIT(type)) : (((data).opt_inited |= CMP_OPTIMIZABLE_BIT(type)), rb_method_basic_definition_p(TOKEN_PASTE(rb_c,type), id_cmp) && ((data).opt_methods |= CMP_OPTIMIZABLE_BIT(type))))
25158#define OPTIMIZED_CMP(a,b,data) ((FIXNUM_P(a) && FIXNUM_P(b) && CMP_OPTIMIZABLE(data, Integer)) ? (((long)a > (long)b) ? 1 : ((long)a < (long)b) ? -1 : 0) : (STRING_P(a) && STRING_P(b) && CMP_OPTIMIZABLE(data, String)) ? rb_str_cmp(a, b) : (RB_FLOAT_TYPE_P(a) && RB_FLOAT_TYPE_P(b) && CMP_OPTIMIZABLE(data, Float)) ? rb_float_cmp(a, b) : rb_cmpint(rb_funcallv(a, id_cmp, 1, &b), a, b))
25159#define INTERNAL_HASH_H
25160#define RHASH_AR_TABLE_MAX_SIZE SIZEOF_VALUE
25161#define RHASH_LEV_MASK (FL_USER13 | FL_USER14 | FL_USER15 | FL_USER16 | FL_USER17 | FL_USER18 | FL_USER19)
25162#define RHASH(obj) ((struct RHash *)(obj))
25163#pragma GCC visibility push(default)
25164#pragma GCC visibility pop
25165#pragma GCC visibility push(default)
25166#define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h, __FILE__, __LINE__)
25167#pragma GCC visibility pop
25168#define INTERNAL_NUMERIC_H
25169#define INTERNAL_BIGNUM_H
25170#define BDIGIT unsigned int
25171#define SIZEOF_BDIGIT SIZEOF_INT
25172#define BDIGIT_DBL unsigned LONG_LONG
25173#define BDIGIT_DBL_SIGNED LONG_LONG
25174#define PRI_BDIGIT_PREFIX ""
25175#define PRI_BDIGIT_DBL_PREFIX PRI_LL_PREFIX
25176#define SIZEOF_ACTUAL_BDIGIT SIZEOF_BDIGIT
25177#define PRIdBDIGIT PRI_BDIGIT_PREFIX"d"
25178#define PRIiBDIGIT PRI_BDIGIT_PREFIX"i"
25179#define PRIoBDIGIT PRI_BDIGIT_PREFIX"o"
25180#define PRIuBDIGIT PRI_BDIGIT_PREFIX"u"
25181#define PRIxBDIGIT PRI_BDIGIT_PREFIX"x"
25182#define PRIXBDIGIT PRI_BDIGIT_PREFIX"X"
25183#define PRIdBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"d"
25184#define PRIiBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"i"
25185#define PRIoBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"o"
25186#define PRIuBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"u"
25187#define PRIxBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"x"
25188#define PRIXBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"X"
25189#define RBIGNUM(obj) ((struct RBignum *)(obj))
25190#define BIGNUM_SIGN_BIT FL_USER1
25191#define BIGNUM_EMBED_FLAG ((VALUE)FL_USER2)
25192#define BIGNUM_EMBED_LEN_NUMBITS 3
25193#define BIGNUM_EMBED_LEN_MASK (~(~(VALUE)0U << BIGNUM_EMBED_LEN_NUMBITS) << BIGNUM_EMBED_LEN_SHIFT)
25194#define BIGNUM_EMBED_LEN_SHIFT (FL_USHIFT+3)
25195#define BIGNUM_EMBED_LEN_MAX (SIZEOF_VALUE*RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT)
25196#pragma GCC visibility push(default)
25197#pragma GCC visibility pop
25198#pragma GCC visibility push(default)
25199#pragma GCC visibility pop
25200#define INTERNAL_BITS_H
25201#define HALF_LONG_MSB ((SIGNED_VALUE)1<<((SIZEOF_LONG*CHAR_BIT-1)/2))
25202#define SIGNED_INTEGER_TYPE_P(T) (0 > ((T)0)-1)
25203#define SIGNED_INTEGER_MIN(T) ((sizeof(T) == sizeof(int8_t)) ? ((T)INT8_MIN) : ((sizeof(T) == sizeof(int16_t)) ? ((T)INT16_MIN) : ((sizeof(T) == sizeof(int32_t)) ? ((T)INT32_MIN) : ((sizeof(T) == sizeof(int64_t)) ? ((T)INT64_MIN) : 0))))
25204#define SIGNED_INTEGER_MAX(T) ((T)(SIGNED_INTEGER_MIN(T) ^ ((T)~(T)0)))
25205#define UNSIGNED_INTEGER_MAX(T) ((T)~(T)0)
25206#define MUL_OVERFLOW_P(a,b) __builtin_mul_overflow_p((a), (b), (__typeof__(a * b))0)
25207#define MUL_OVERFLOW_SIGNED_INTEGER_P(a,b,min,max) ( (a) == 0 ? 0 : (a) == -1 ? (b) < -(max) : (a) > 0 ? ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
25208#define MUL_OVERFLOW_FIXNUM_P(a,b) __extension__ ({ struct { long fixnum : sizeof(long) * CHAR_BIT - 1; } c = { 0 }; __builtin_mul_overflow_p((a), (b), c.fixnum); })
25209#define MUL_OVERFLOW_LONG_LONG_P(a,b) MUL_OVERFLOW_P(a, b)
25210#define MUL_OVERFLOW_LONG_P(a,b) MUL_OVERFLOW_P(a, b)
25211#define MUL_OVERFLOW_INT_P(a,b) MUL_OVERFLOW_P(a, b)
25212#define bit_length(x) (unsigned int) (sizeof(x) <= sizeof(int32_t) ? 32 - nlz_int32((uint32_t)(x)) : sizeof(x) <= sizeof(int64_t) ? 64 - nlz_int64((uint64_t)(x)) : 128 - nlz_int128((uint128_t)(x)))
25213#define swap16 ruby_swap16
25214#define swap32 ruby_swap32
25215#define swap64 ruby_swap64
25216#define INTERNAL_FIXNUM_H
25217#define DLONG int128_t
25218#define DL2NUM(x) (RB_FIXABLE(x) ? LONG2FIX(x) : rb_int128t2big(x))
25219#define ROUND_TO(mode,even,up,down) ((mode) == RUBY_NUM_ROUND_HALF_EVEN ? even : (mode) == RUBY_NUM_ROUND_HALF_UP ? up : down)
25220#define ROUND_FUNC(mode,name) ROUND_TO(mode, name ##_half_even, name ##_half_up, name ##_half_down)
25221#define ROUND_CALL(mode,name,args) ROUND_TO(mode, name ##_half_even args, name ##_half_up args, name ##_half_down args)
25222#define ROUND_DEFAULT RUBY_NUM_ROUND_HALF_UP
25223#define RFLOAT(obj) ((struct RFloat *)(obj))
25224#define rb_float_value rb_float_value_inline
25225#define rb_float_new rb_float_new_inline
25226#pragma GCC visibility push(default)
25227#pragma GCC visibility pop
25228#pragma GCC visibility push(default)
25229#pragma GCC visibility pop
25230#define INTERNAL_RANDOM_H
25231#define INTERNAL_VARIABLE_H
25232#define ROBJECT_TRANSIENT_FLAG FL_USER13
25233#pragma GCC visibility push(default)
25234#pragma GCC visibility pop
25235#pragma GCC visibility push(default)
25236#pragma GCC visibility pop
25237#define RUBY_TOPLEVEL_VARIABLE_H
25238#define BIN(n) YARVINSN_ ##n
25239#define ASSERT_VM_INSTRUCTION_SIZE(array) STATIC_ASSERT(numberof_ ##array, numberof(array) == VM_INSTRUCTION_SIZE)
25240#define vm_check_canary(ec,sp)
25241#define vm_check_frame(a,b,c,d)
25242#define vm_push_frame_debug_counter_inc(ec,cfp,t)
25243#pragma GCC diagnostic push
25244#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25245#pragma GCC diagnostic pop
25246#pragma GCC diagnostic push
25247#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25248#pragma GCC diagnostic pop
25249#pragma GCC diagnostic push
25250#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25251#pragma GCC diagnostic pop
25252#pragma GCC diagnostic push
25253#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25254#pragma GCC diagnostic pop
25255#pragma GCC diagnostic push
25256#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25257#pragma GCC diagnostic pop
25258#pragma GCC diagnostic push
25259#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25260#pragma GCC diagnostic pop
25261#pragma GCC diagnostic push
25262#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25263#pragma GCC diagnostic pop
25264#pragma GCC diagnostic push
25265#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25266#pragma GCC diagnostic pop
25267#pragma GCC diagnostic push
25268#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25269#pragma GCC diagnostic pop
25270#pragma GCC diagnostic push
25271#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25272#pragma GCC diagnostic pop
25273#pragma GCC diagnostic push
25274#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25275#pragma GCC diagnostic pop
25276#define EQ_UNREDEFINED_P(t) BASIC_OP_UNREDEFINED_P(BOP_EQ, t ##_REDEFINED_OP_FLAG)
25277#undef EQ_UNREDEFINED_P
25278#define CHECK_CMP_NAN(a,b)
25279#define KW_SPECIFIED_BITS_MAX (32-1)
25280#define USE_OPT_HIST 0
25281#define CHECK_CFP_CONSISTENCY(func) (LIKELY(vm_cfp_consistent_p(ec, reg_cfp)) ? (void)0 : rb_bug(func ": cfp consistency error (%p, %p)", (void *)reg_cfp, (void *)(ec->cfp+1)))
25282#pragma GCC diagnostic push
25283#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25284#pragma GCC diagnostic pop
25285#pragma GCC diagnostic push
25286#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25287#pragma GCC diagnostic pop
25288#pragma GCC diagnostic push
25289#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25290#pragma GCC diagnostic pop
25291#pragma GCC diagnostic push
25292#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25293#pragma GCC diagnostic pop
25294#pragma GCC diagnostic push
25295#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25296#pragma GCC diagnostic pop
25297#define mexp_search_method vm_search_method_wrap
25298#define mexp_search_super vm_search_super_method
25299#define mexp_search_invokeblock vm_search_invokeblock
25300#define id_cmp idCmp
25301#undef id_cmp
25302#define IMEMO_CONST_CACHE_SHAREABLE IMEMO_FL_USER0
25303#pragma GCC diagnostic push
25304#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25305#pragma GCC diagnostic pop
25306#pragma GCC diagnostic push
25307#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25308#pragma GCC diagnostic pop
25309#pragma GCC diagnostic push
25310#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25311#pragma GCC diagnostic pop
25312#define VM_TRACE_HOOK(target_event,val) do { if ((pc_events & (target_event)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (target_event), global_hooks, local_hooks, (val)); } } while (0)
25313#define id_mesg idMesg
std::atomic< unsigned > rb_atomic_t
Type that is eligible for atomic operations.
Definition: atomic.h:69
static VALUE RB_CHR2FIX(unsigned char c)
Converts a C's unsigned char into an instance of rb_cInteger.
Definition: char.h:56
static char rb_num2char_inline(VALUE x)
Converts an instance of rb_cNumeric into C's char.
Definition: char.h:73
@ RUBY_ENC_CODERANGE_MASK
Where the coderange resides.
Definition: coderange.h:48
@ RUBY_ENC_CODERANGE_VALID
The object's encoding and contents are consistent each other.
Definition: coderange.h:42
@ RUBY_ENC_CODERANGE_7BIT
The object holds 0 to 127 inclusive and nothing else.
Definition: coderange.h:39
@ RUBY_ENC_CODERANGE_UNKNOWN
The object's coderange is unclear yet.
Definition: coderange.h:36
@ RUBY_ENC_CODERANGE_BROKEN
The object holds invalid/malformed/broken character(s).
Definition: coderange.h:45
static int rb_isdigit(int c)
Our own locale-insensitive version of isdigit(3).
Definition: ctype.h:302
static int rb_isupper(int c)
Our own locale-insensitive version of isupper(3).
Definition: ctype.h:232
static int rb_iscntrl(int c)
Our own locale-insensitive version of iscntrl(3).
Definition: ctype.h:418
static int rb_ispunct(int c)
Our own locale-insensitive version of ispunct(3).
Definition: ctype.h:465
static int rb_isalnum(int c)
Our own locale-insensitive version of isalnum(3).
Definition: ctype.h:326
static int rb_isxdigit(int c)
Our own locale-insensitive version of isxdigit(3).
Definition: ctype.h:349
static int rb_isspace(int c)
Our own locale-insensitive version of isspace(3).
Definition: ctype.h:395
static int rb_isascii(int c)
Our own locale-insensitive version of isascii(3).
Definition: ctype.h:209
static int rb_toupper(int c)
Our own locale-insensitive version of toupper(3).
Definition: ctype.h:539
unsigned long ruby_strtoul(const char *str, char **endptr, int base)
Our own locale-insensitive version of strtoul(3).
Definition: util.c:133
static int rb_tolower(int c)
Our own locale-insensitive version of tolower(3).
Definition: ctype.h:514
static int rb_isgraph(int c)
Our own locale-insensitive version of isgraph(3).
Definition: ctype.h:489
static int rb_isalpha(int c)
Our own locale-insensitive version of isalpha(3).
Definition: ctype.h:279
static int rb_islower(int c)
Our own locale-insensitive version of islower(3).
Definition: ctype.h:255
static int rb_isprint(int c)
Identical to rb_isgraph(), except it also returns true for ‘’ '`.
Definition: ctype.h:442
static int rb_isblank(int c)
Our own locale-insensitive version of isblank(3).
Definition: ctype.h:372
#define rb_define_method_id(klass, mid, func, arity)
Defines klass#mid.
Definition: cxxanyargs.hpp:673
#define rb_define_singleton_method(klass, mid, func, arity)
Defines klass.mid.
Definition: cxxanyargs.hpp:685
#define rb_define_protected_method(klass, mid, func, arity)
Defines klass#mid and makes it protected.
Definition: cxxanyargs.hpp:681
#define rb_define_private_method(klass, mid, func, arity)
Defines klass#mid and makes it private.
Definition: cxxanyargs.hpp:677
double rb_float_value(VALUE num)
Extracts its double value from an instance of rb_cFloat.
Definition: numeric.c:6418
VALUE rb_float_new_in_heap(double d)
Identical to rb_float_new(), except it does not generate Flonums.
Definition: numeric.c:1014
VALUE rb_float_new(double d)
Converts a C's double into an instance of rb_cFloat.
Definition: numeric.c:6425
int rb_enc_tolower(int c, rb_encoding *enc)
Identical to rb_tolower(), except it additionally takes an encoding.
Definition: encoding.c:1300
int rb_enc_toupper(int c, rb_encoding *enc)
Identical to rb_toupper(), except it additionally takes an encoding.
Definition: encoding.c:1294
VALUE rb_enc_vsprintf(rb_encoding *enc, const char *fmt, va_list ap)
Identical to rb_enc_sprintf(), except it takes a va_list instead of variadic arguments.
Definition: sprintf.c:1149
VALUE rb_enc_sprintf(rb_encoding *enc, const char *fmt,...)
Identical to rb_sprintf(), except it additionally takes an encoding.
Definition: sprintf.c:1182
void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data)
Registers an event hook function.
Definition: vm_trace.c:186
int rb_remove_event_hook(rb_event_hook_func_t func)
Removes the passed function from the list of event hooks.
Definition: vm_trace.c:294
void(* rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass)
Type of event hooks.
Definition: event.h:115
uint32_t rb_event_flag_t
Represents event(s).
Definition: event.h:103
ruby_fl_ushift
This is an enum because GDB wants it (rather than a macro).
Definition: fl_type.h:162
@ RUBY_FL_USHIFT
Number of bits in ruby_fl_type that are not open to users.
Definition: fl_type.h:167
static VALUE RB_OBJ_FROZEN_RAW(VALUE obj)
This is an implenentation detail of RB_OBJ_FROZEN().
Definition: fl_type.h:906
static bool RB_OBJ_TAINTABLE(VALUE obj)
Definition: fl_type.h:788
static VALUE RB_FL_TEST(VALUE obj, VALUE flags)
Tests if the given flag(s) are set or not.
Definition: fl_type.h:527
static VALUE RB_FL_TEST_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_TEST().
Definition: fl_type.h:501
static bool RB_FL_ABLE(VALUE obj)
Checks if the object is flaggable.
Definition: fl_type.h:476
static bool RB_FL_ANY_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_ANY().
Definition: fl_type.h:550
static void rb_obj_freeze_inline(VALUE x)
Prevents further modifications to the given object.
Definition: fl_type.h:951
static bool RB_FL_ANY(VALUE obj, VALUE flags)
Identical to RB_FL_TEST(), except it returns bool.
Definition: fl_type.h:566
static void RB_FL_SET_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_SET().
Definition: fl_type.h:638
static bool RB_FL_ALL(VALUE obj, VALUE flags)
Identical to RB_FL_ANY(), except it mandates all passed flags be set.
Definition: fl_type.h:600
static bool RB_OBJ_FROZEN(VALUE obj)
Checks if an object is frozen.
Definition: fl_type.h:921
static bool RB_OBJ_TAINTED(VALUE obj)
Definition: fl_type.h:822
static VALUE RB_OBJ_TAINTED_RAW(VALUE obj)
Definition: fl_type.h:805
static void RB_OBJ_INFECT(VALUE dst, VALUE src)
Definition: fl_type.h:884
static void RB_FL_UNSET_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_UNSET().
Definition: fl_type.h:698
@ RUBY_FL_DUPPED
Definition: fl_type.h:439
static void RB_FL_SET(VALUE obj, VALUE flags)
Sets the given flag(s).
Definition: fl_type.h:658
static void RB_OBJ_INFECT_RAW(VALUE dst, VALUE src)
Definition: fl_type.h:868
static void RB_FL_REVERSE(VALUE obj, VALUE flags)
Reverses the flags.
Definition: fl_type.h:769
static void RB_FL_UNSET(VALUE obj, VALUE flags)
Clears the given flag(s).
Definition: fl_type.h:713
static void RB_OBJ_FREEZE_RAW(VALUE obj)
This is an implenentation detail of RB_OBJ_FREEZE().
Definition: fl_type.h:939
static void RB_FL_REVERSE_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_REVERSE().
Definition: fl_type.h:753
static bool RB_FL_ALL_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_ALL().
Definition: fl_type.h:584
@ RUBY_FL_PROMOTED1
This flag has something to do with our garbage collector.
Definition: fl_type.h:240
@ RUBY_ELTS_SHARED
This flag has something to do with data structures.
Definition: fl_type.h:405
@ RUBY_FL_USER9
User-defined flag.
Definition: fl_type.h:369
@ RUBY_FL_SINGLETON
This flag has something to do with an object's class.
Definition: fl_type.h:430
@ RUBY_FL_USER8
User-defined flag.
Definition: fl_type.h:368
@ RUBY_FL_USER11
User-defined flag.
Definition: fl_type.h:371
@ RUBY_FL_USER5
User-defined flag.
Definition: fl_type.h:365
@ RUBY_FL_TAINT
Definition: fl_type.h:278
@ RUBY_FL_USER3
User-defined flag.
Definition: fl_type.h:363
@ RUBY_FL_USER17
User-defined flag.
Definition: fl_type.h:377
@ RUBY_FL_USER10
User-defined flag.
Definition: fl_type.h:370
@ RUBY_FL_USER7
User-defined flag.
Definition: fl_type.h:367
@ RUBY_FL_WB_PROTECTED
Definition: fl_type.h:207
@ RUBY_FL_PROMOTED0
This flag has something to do with our garbage collector.
Definition: fl_type.h:223
@ RUBY_FL_USER14
User-defined flag.
Definition: fl_type.h:374
@ RUBY_FL_USER6
User-defined flag.
Definition: fl_type.h:366
@ RUBY_FL_USER16
User-defined flag.
Definition: fl_type.h:376
@ RUBY_FL_EXIVAR
This flag has something to do with instance variables.
Definition: fl_type.h:345
@ RUBY_FL_UNTRUSTED
Definition: fl_type.h:305
@ RUBY_FL_PROMOTED
This flag has something to do with our garbage collector.
Definition: fl_type.h:257
@ RUBY_FL_USER0
User-defined flag.
Definition: fl_type.h:360
@ RUBY_FL_FREEZE
This flag has something to do with data immutability.
Definition: fl_type.h:356
@ RUBY_FL_USER15
User-defined flag.
Definition: fl_type.h:375
@ RUBY_FL_SEEN_OBJ_ID
This flag has something to do with object IDs.
Definition: fl_type.h:332
@ RUBY_FL_USER2
User-defined flag.
Definition: fl_type.h:362
@ RUBY_FL_USER4
User-defined flag.
Definition: fl_type.h:364
@ RUBY_FL_USER18
User-defined flag.
Definition: fl_type.h:378
@ RUBY_FL_USER1
User-defined flag.
Definition: fl_type.h:361
@ RUBY_FL_SHAREABLE
This flag has something to do with Ractor.
Definition: fl_type.h:298
@ RUBY_FL_FINALIZE
This flag has something to do with finalisers.
Definition: fl_type.h:271
@ RUBY_FL_USER19
User-defined flag.
Definition: fl_type.h:380
@ RUBY_FL_USER13
User-defined flag.
Definition: fl_type.h:373
@ RUBY_FL_USER12
User-defined flag.
Definition: fl_type.h:372
static void RB_OBJ_TAINT_RAW(VALUE obj)
Definition: fl_type.h:837
static void RB_OBJ_TAINT(VALUE obj)
Definition: fl_type.h:852
int ruby_glob(const char *pattern, int flags, ruby_glob_func *func, VALUE arg)
Identical to rb_glob(), except it returns opaque exception states instead of raising exceptions.
Definition: dir.c:2703
void rb_glob(const char *pattern, void(*func)(const char *path, VALUE arg, void *enc), VALUE arg)
The "glob" operator.
int ruby_brace_glob(const char *pattern, int flags, ruby_glob_func *func, VALUE arg)
Identical to ruby_glob(), @shyouhei currently suspects.
Definition: dir.c:2843
int ruby_glob_func(const char *path, VALUE arg, void *enc)
Type of a glob callback function.
Definition: glob.h:49
void rb_include_module(VALUE, VALUE)
Includes a module to a class.
Definition: class.c:1101
VALUE rb_define_class(const char *, VALUE)
Defines a top-level class.
Definition: class.c:896
void rb_extend_object(VALUE obj, VALUE module)
Extend the object with the module.
Definition: eval.c:1676
void rb_prepend_module(VALUE, VALUE)
Identical to rb_include_module(), except it "prepends" the passed module to the klass,...
Definition: class.c:1356
VALUE rb_define_class_under(VALUE, const char *, VALUE)
Defines a class under the namespace of outer.
Definition: class.c:928
VALUE rb_class_boot(VALUE)
A utility function that wraps class_alloc.
Definition: class.c:252
VALUE rb_define_module(const char *)
Defines a top-level module.
Definition: class.c:1006
void rb_class_modify_check(VALUE)
Asserts that klass is not a frozen class.
Definition: eval.c:422
VALUE rb_class_inherited(VALUE, VALUE)
Calls Class::inherited.
Definition: class.c:887
VALUE rb_define_module_under(VALUE, const char *)
Defines a module under the namespace of outer.
Definition: class.c:1030
VALUE rb_singleton_class_get(VALUE obj)
Returns the singleton class of obj, or nil if obj is not a singleton object.
Definition: class.c:2146
void rb_define_alias(VALUE, const char *, const char *)
Defines an alias of a method.
Definition: class.c:2208
void rb_define_module_function(VALUE module, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a module function for a module.
Definition: class.c:2192
void rb_need_block(void)
Declares that the current method needs a block.
Definition: eval.c:872
void rb_define_attr(VALUE, const char *, int, int)
Defines public accessor method(s) for an attribute.
Definition: class.c:2214
void rb_undef_method(VALUE, const char *)
Defines an undef of a method.
Definition: class.c:2030
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a method.
Definition: class.c:2006
int rb_keyword_given_p(void)
Determines if the current method is given a keyword argument.
Definition: eval.c:864
int rb_block_given_p(void)
Determines if the current method is given a block.
Definition: eval.c:851
void rb_define_global_function(const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a global function.
Definition: class.c:2202
#define rb_str_buf_new2
Old name of rb_str_buf_new_cstr.
Definition: string.h:1679
VALUE rb_complex_polar(VALUE x, VALUE y)
Old name of rb_complex_new_polar.
Definition: complex.c:1541
@ RUBY_ECONV_STATEFUL_DECORATOR_MASK
(Unclear; seems unused).
Definition: transcode.h:506
@ RUBY_ECONV_CRLF_NEWLINE_DECORATOR
CR to CRLF conversion shall happen.
Definition: transcode.h:494
@ RUBY_ECONV_AFTER_OUTPUT
Instructs the converter to stop after output.
Definition: transcode.h:549
@ RUBY_ECONV_FLAGS_PLACEHOLDER
Placeholder (not used)
Definition: transcode.h:553
@ RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK
(Unclear; seems unused).
Definition: transcode.h:488
@ RUBY_ECONV_ERROR_HANDLER_MASK
Mask for error handling related bits.
Definition: transcode.h:461
@ RUBY_ECONV_UNDEF_MASK
Special handling of undefined conversion are there.
Definition: transcode.h:470
@ RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR
Texts shall be AttrValue escaped.
Definition: transcode.h:503
@ RUBY_ECONV_INVALID_REPLACE
Invalid sequences shall be replaced.
Definition: transcode.h:467
@ RUBY_ECONV_XML_TEXT_DECORATOR
Texts shall be XML-escaped.
Definition: transcode.h:500
@ RUBY_ECONV_NEWLINE_DECORATOR_MASK
Newline converters are there.
Definition: transcode.h:482
@ RUBY_ECONV_UNDEF_HEX_CHARREF
Undefined characters shall be escaped.
Definition: transcode.h:476
@ RUBY_ECONV_PARTIAL_INPUT
Indicates the input is a part of much larger one.
Definition: transcode.h:546
@ RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR
Universal newline mode.
Definition: transcode.h:491
@ RUBY_ECONV_INVALID_MASK
Special handling of invalid sequences are there.
Definition: transcode.h:464
@ RUBY_ECONV_UNDEF_REPLACE
Undefined characters shall be replaced.
Definition: transcode.h:473
@ RUBY_ECONV_DECORATOR_MASK
Decorators are there.
Definition: transcode.h:479
@ RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR
Texts shall be AttrValue escaped.
Definition: transcode.h:509
@ RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR
Newline decorator's default.
Definition: transcode.h:512
@ RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK
(Unclear; seems unused).
Definition: transcode.h:485
@ RUBY_ECONV_CR_NEWLINE_DECORATOR
CRLF to CR conversion shall happen.
Definition: transcode.h:497
void ruby_stop(int ex)
Calls ruby_cleanup() and exits the process.
Definition: eval.c:289
int ruby_exec_node(void *n)
Identical to ruby_run_node(), except it returns an opaque execution status.
Definition: eval.c:325
int ruby_setup(void)
Initializes the VM and builtin libraries.
Definition: eval.c:65
void ruby_finalize(void)
Runs the VM finalization processes.
Definition: eval.c:168
void ruby_init_stack(volatile VALUE *addr)
Set stack bottom of Ruby implementation.
void ruby_script(const char *name)
Sets the current script name to this value.
Definition: ruby.c:2495
void ruby_set_argv(int argc, char **argv)
Sets argv that ruby understands.
Definition: ruby.c:2610
void ruby_set_script_name(VALUE name)
Identical to ruby_script(), except it takes the name as a Ruby String instance.
Definition: ruby.c:2508
int ruby_cleanup(int ex)
Destructs the VM.
Definition: eval.c:176
size_t ruby_stack_length(VALUE **p)
Queries what Ruby thinks is the machine stack.
Definition: gc.c:6248
int ruby_stack_check(void)
Checks for stack overflow.
Definition: gc.c:6288
void ruby_init_loadpath(void)
Sets up $LOAD_PATH.
Definition: ruby.c:619
void * ruby_process_options(int argc, char **argv)
Identical to ruby_options(), except it raises ruby-level exceptions on failure.
Definition: ruby.c:2625
void ruby_prog_init(void)
Defines built-in variables.
Definition: ruby.c:2578
void ruby_sig_finalize(void)
Clear signal handlers.
Definition: signal.c:1497
void ruby_incpush(const char *path)
Appends the given path to the end of the load path.
Definition: ruby.c:458
void rb_notimplement(void)
Definition: error.c:3144
void rb_mod_sys_fail(VALUE mod, const char *mesg)
Identical to rb_sys_fail(), except it takes additional module to extend the exception object before r...
Definition: error.c:3280
rb_warning_category_t
Warning categories.
Definition: error.h:43
VALUE rb_eLocalJumpError
LocalJumpError exception.
Definition: eval.c:48
void rb_category_warn(rb_warning_category_t, const char *,...)
Identical to rb_category_warning(), except it reports always regardless of runtime -W flag.
Definition: error.c:429
void rb_raise(VALUE exc, const char *fmt,...)
Exception entry point.
Definition: error.c:3101
void rb_compile_warn(const char *file, int line, const char *fmt,...)
Identical to rb_compile_warning(), except it reports always regardless of runtime -W flag.
Definition: error.c:361
void rb_category_warning(rb_warning_category_t cat, const char *fmt,...)
Identical to rb_warning(), except it takes additional "category" parameter.
Definition: error.c:461
void rb_mod_syserr_fail(VALUE mod, int e, const char *mesg)
Identical to rb_mod_sys_fail(), except it does not depend on C global variable errno.
Definition: error.c:3294
VALUE rb_rescue2(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*r_proc)(VALUE, VALUE), VALUE data2,...)
An equivalent of rescue clause.
Definition: eval.c:880
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition: eval.c:671
void rb_syserr_fail(int e, const char *mesg)
Raises appropriate exception that represents a C errno.
Definition: error.c:3213
void rb_bug(const char *fmt,...)
Interpreter panic switch.
Definition: error.c:803
void rb_iter_break(void)
Breaks from a block.
Definition: vm.c:1822
void rb_sys_fail(const char *mesg)
Converts a C errno into a Ruby exception, then raises it.
Definition: error.c:3225
VALUE rb_eZeroDivError
ZeroDivisionError exception.
Definition: numeric.c:194
void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite waiting, int err, const char *msg)
Identical to rb_readwrite_sys_fail(), except it does not depend on C global variable errno.
Definition: io.c:14003
void rb_sys_warning(const char *fmt,...)
Identical to rb_sys_fail(), except it does not raise an exception to render a warning instead.
Definition: error.c:3362
VALUE rb_eIOError
IOError exception.
Definition: io.c:188
VALUE rb_syserr_new_str(int n, VALUE arg)
Identical to rb_syserr_new(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3207
void rb_mod_syserr_fail_str(VALUE mod, int e, VALUE mesg)
Identical to rb_mod_syserr_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3301
void rb_error_frozen(const char *what)
Identical to rb_frozen_error_raise(), except its raising exception has a message like "can't modify f...
Definition: error.c:3417
void rb_set_errinfo(VALUE err)
Sets the current exception ($!) to the given value.
Definition: eval.c:1861
VALUE rb_eRegexpError
RegexpError exception.
Definition: re.c:30
void rb_syserr_fail_str(int e, VALUE mesg)
Identical to rb_syserr_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3219
VALUE rb_eEOFError
EOFError exception.
Definition: io.c:187
VALUE rb_vrescue2(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*r_proc)(VALUE, VALUE), VALUE data2, va_list args)
Identical to rb_rescue2(), except it takes va_list instead of variadic number of arguments.
Definition: eval.c:891
void rb_fatal(const char *fmt,...)
Raises the unsung "fatal" exception.
Definition: error.c:3152
void rb_readwrite_sys_fail(enum rb_io_wait_readwrite waiting, const char *msg)
Raises appropriate exception using the parameters.
Definition: io.c:13997
void rb_iter_break_value(VALUE val)
Identical to rb_iter_break(), except it additionally takes the "value" of this breakage.
Definition: vm.c:1828
void rb_category_compile_warn(rb_warning_category_t cat, const char *file, int line, const char *fmt,...)
Identical to rb_compile_warn(), except it also accepts category.
Definition: error.c:390
void rb_invalid_str(const char *str, const char *type)
Honestly I don't understand the name, but it raises an instance of rb_eArgError.
Definition: error.c:2160
void rb_exc_fatal(VALUE mesg)
Raises a fatal error in the current thread.
Definition: eval.c:684
VALUE * rb_ruby_verbose_ptr(void)
This is an implementation detail of ruby_verbose.
Definition: vm.c:4011
VALUE rb_eStopIteration
StopIteration exception.
Definition: enumerator.c:141
VALUE rb_eFloatDomainError
FloatDomainError exception.
Definition: numeric.c:195
const char const char const char const char void rb_warn(const char *,...)
Identical to rb_warning(), except it reports always regardless of runtime -W flag.
Definition: error.c:419
void rb_error_frozen_object(VALUE frozen_obj)
Identical to rb_error_frozen(), except it takes arbitrary Ruby object instead of C's string.
Definition: error.c:3449
void rb_bug_errno(const char *mesg, int errno_arg)
This is a wrapper of rb_bug() which automatically constructs appropriate message from the passed errn...
Definition: error.c:831
void rb_compile_warning(const char *file, int line, const char *fmt,...)
Issues a compile-time warning that happens at __file__:__line__.
Definition: error.c:376
VALUE rb_rescue(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*r_proc)(VALUE, VALUE), VALUE data2)
Identical to rb_rescue2(), except it does not take a list of exception classes.
Definition: eval.c:951
VALUE * rb_ruby_debug_ptr(void)
This is an implementation detail of ruby_debug.
Definition: vm.c:4018
VALUE rb_ensure(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*e_proc)(VALUE), VALUE data2)
An equivalent to ensure clause.
Definition: eval.c:980
VALUE rb_errinfo(void)
This is the same as $! in Ruby.
Definition: eval.c:1855
VALUE rb_eSysStackError
SystemStackError exception.
Definition: eval.c:49
VALUE rb_syserr_new(int, const char *)
Creates an exception object that represents the given C errno.
Definition: error.c:3199
void rb_sys_fail_str(VALUE mesg)
Identical to rb_sys_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3231
void rb_unexpected_type(VALUE x, int t)
Fails with the given object's type incompatibility to the type.
Definition: error.c:1030
void rb_mod_sys_fail_str(VALUE mod, VALUE mesg)
Identical to rb_mod_sys_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3287
VALUE rb_eThreadError
ThreadError exception.
Definition: eval.c:869
void rb_exit(int status)
Terminates the current execution context.
Definition: process.c:4503
VALUE rb_eMathDomainError
Math::DomainError exception.
Definition: math.c:30
void rb_check_type(VALUE x, int t)
This was the old implementation of Check_Type(), but they diverged.
Definition: error.c:1007
void rb_warning(const char *fmt,...)
Issues a warning.
Definition: error.c:450
@ RB_WARN_CATEGORY_DEPRECATED
Warning is for deprecated features.
Definition: error.h:48
@ RB_WARN_CATEGORY_EXPERIMENTAL
Warning is for experimental features.
Definition: error.h:51
@ RB_WARN_CATEGORY_NONE
Category unspecified.
Definition: error.h:45
VALUE rb_cRational
Rational class.
Definition: rational.c:47
VALUE rb_class_superclass(VALUE)
Returns the superclass of klass.
Definition: object.c:1963
VALUE rb_cUnboundMethod
UnboundMethod class.
Definition: proc.c:46
VALUE rb_cTime
Time class.
Definition: time.c:647
VALUE rb_cDir
Dir class.
Definition: dir.c:458
VALUE rb_cComplex
Complex class.
Definition: complex.c:38
VALUE rb_cArray
Array class.
Definition: array.c:40
VALUE rb_mProcess
Process module.
Definition: process.c:8764
VALUE rb_mMath
Math module.
Definition: math.c:29
VALUE rb_cIO
IO class.
Definition: io.c:186
VALUE rb_mEnumerable
Enumerable module.
Definition: enum.c:27
VALUE rb_cMatch
MatchData class.
Definition: re.c:956
VALUE rb_cStruct
Struct class.
Definition: struct.c:31
VALUE rb_cEnumerator
Enumerator class.
Definition: enumerator.c:126
VALUE rb_cInteger
Module class.
Definition: numeric.c:192
VALUE rb_cRactor
Ractor class.
Definition: ractor.c:21
VALUE rb_stdin
STDIN constant.
Definition: io.c:199
VALUE rb_cStat
File::Stat class.
Definition: file.c:176
VALUE rb_Hash(VALUE)
Equivalent to Kernel#Hash in Ruby.
Definition: object.c:3661
VALUE rb_cBinding
Binding class.
Definition: proc.c:48
VALUE rb_cRegexp
Regexp class.
Definition: re.c:2459
VALUE rb_obj_frozen_p(VALUE obj)
Just calls RB_OBJ_FROZEN() inside.
Definition: object.c:1159
VALUE rb_mGC
GC module.
Definition: gc.c:1151
VALUE rb_obj_init_copy(VALUE, VALUE)
Default implementation of #initialize_copy.
Definition: object.c:501
VALUE rb_cHash
Hash class.
Definition: hash.c:92
VALUE rb_stderr
STDERR constant.
VALUE rb_cNumeric
Numeric class.
Definition: numeric.c:190
static VALUE rb_class_of(VALUE obj)
Object to class mapping function.
Definition: globals.h:172
VALUE rb_cRandom
Random class.
Definition: random.c:229
VALUE rb_cEncoding
Encoding class.
Definition: encoding.c:57
VALUE rb_cSymbol
Sumbol class.
Definition: string.c:80
VALUE rb_cThread
Thread class.
Definition: vm.c:401
VALUE rb_class_inherited_p(VALUE scion, VALUE ascendant)
Determines if the given two modules are relatives.
Definition: object.c:1575
VALUE rb_cRange
Range class.
Definition: range.c:31
VALUE rb_class_real(VALUE klass)
Finds a "real" class.
Definition: object.c:178
VALUE rb_mFileTest
FileTest module.
Definition: file.c:175
VALUE rb_mWaitReadable
IO::WaitReadable module.
Definition: io.c:189
VALUE rb_mWaitWritable
IO::WaitReadable module.
Definition: io.c:190
VALUE rb_mComparable
Comparable module.
Definition: compar.c:19
VALUE rb_class_search_ancestor(VALUE klass, VALUE super)
Internal header for Object.
Definition: object.c:810
VALUE rb_cFloat
Float class.
Definition: numeric.c:191
VALUE rb_cProc
Proc class.
Definition: proc.c:49
VALUE rb_cFile
File class.
Definition: file.c:174
VALUE rb_stdout
STDOUT constant.
VALUE rb_cString
String class.
Definition: string.c:79
VALUE rb_cMethod
Method class.
Definition: proc.c:47
int ruby_run_node(void *n)
Runs the given compiled source and exits this process.
Definition: eval.c:312
void ruby_init(void)
Calls ruby_setup() and check error.
Definition: eval.c:98
void * ruby_options(int argc, char **argv)
Processes command line arguments and compiles the Ruby source to execute.
Definition: eval.c:109
void ruby_show_copyright(void)
Prints the copyright notice of the CRuby interpreter to stdout.
Definition: version.c:145
void ruby_sysinit(int *argc, char ***argv)
Initializes the process for libruby.
Definition: ruby.c:2678
void ruby_show_version(void)
Prints the version information of the CRuby interpreter to stdout.
Definition: version.c:123
int ruby_executable_node(void *n, int *status)
Checks the return value of ruby_options().
Definition: eval.c:295
int rb_enc_dummy_p(rb_encoding *enc)
Queries if the passed encoding is dummy.
Definition: encoding.c:203
int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc)
Queries the number of bytes of the character at the passed pointer.
Definition: encoding.c:1234
int rb_enc_get_index(VALUE obj)
Queries the index of the encoding of the passed object, if any.
Definition: encoding.c:979
int rb_to_encoding_index(VALUE obj)
Obtains a encoding index from a wider range of objects (than rb_enc_find_index()).
Definition: encoding.c:267
int rb_filesystem_encindex(void)
Identical to rb_filesystem_encoding(), except it returns the encoding's index instead of the encoding...
Definition: encoding.c:1579
VALUE rb_enc_associate(VALUE obj, rb_encoding *enc)
Identical to rb_enc_associate_index(), except it takes an encoding itself instead of its index.
Definition: encoding.c:1066
rb_encoding * rb_utf8_encoding(void)
Queries the encoding that represents UTF-8.
Definition: encoding.c:1527
rb_encoding * rb_ascii8bit_encoding(void)
Queries the encoding that represents ASCII-8BIT a.k.a.
Definition: encoding.c:1515
int rb_enc_codelen(int code, rb_encoding *enc)
Queries the number of bytes requested to represent the passed code point using the passed encoding.
Definition: encoding.c:1284
rb_encoding * rb_to_encoding(VALUE obj)
Identical to rb_find_encoding(), except it raises an exception instead of returning NULL.
Definition: encoding.c:329
const OnigEncodingType rb_encoding
The type of encoding.
Definition: encoding.h:116
rb_encoding * rb_filesystem_encoding(void)
Queries the "filesystem" encoding.
Definition: encoding.c:1592
rb_encoding * rb_default_internal_encoding(void)
Queries the "default internal" encoding.
Definition: encoding.c:1724
void rb_enc_copy(VALUE dst, VALUE src)
Destructively copies the encoding of the latter object to that of former one.
Definition: encoding.c:1192
int rb_utf8_encindex(void)
Identical to rb_utf8_encoding(), except it returns the encoding's index instead of the encoding itsel...
Definition: encoding.c:1533
int rb_enc_fast_mbclen(const char *p, const char *e, rb_encoding *enc)
Identical to rb_enc_mbclen() unless the character at p overruns e.
Definition: encoding.c:1216
rb_encoding * rb_enc_get(VALUE obj)
Identical to rb_enc_get_index(), except the return type.
Definition: encoding.c:1072
rb_encoding * rb_enc_from_index(int idx)
Identical to rb_find_encoding(), except it takes an encoding index instead of a Ruby object.
Definition: encoding.c:414
int rb_ascii8bit_encindex(void)
Identical to rb_ascii8bit_encoding(), except it returns the encoding's index instead of the encoding ...
Definition: encoding.c:1521
unsigned int rb_enc_codepoint_len(const char *p, const char *e, int *len, rb_encoding *enc)
Queries the code point of character pointed by the passed pointer.
Definition: encoding.c:1270
int rb_enc_unicode_p(rb_encoding *enc)
Queries if the passed encoding is either one of UTF-8/16/32.
Definition: encoding.c:689
int rb_enc_to_index(rb_encoding *enc)
Queries the index of the encoding.
Definition: encoding.c:197
void rb_enc_set_index(VALUE obj, int encindex)
Destructively assigns an encoding (via its index) to an object.
Definition: encoding.c:1030
VALUE rb_locale_charmap(VALUE klass)
Returns a platform-depended "charmap" of the current locale.
Definition: localeinit.c:91
void rb_enc_set_default_internal(VALUE encoding)
Destructively assigns the passed encoding as the default internal encoding.
Definition: encoding.c:1774
VALUE rb_enc_default_external(void)
Identical to rb_default_external_encoding(), except it returns the Ruby-level counterpart instance of...
Definition: encoding.c:1651
rb_encoding * rb_enc_find(const char *name)
Identical to rb_find_encoding(), except it takes a C's string instead of Ruby's.
Definition: encoding.c:918
VALUE rb_enc_from_encoding(rb_encoding *enc)
Queries the Ruby-level counterpart instance of rb_cEncoding that corresponds to the passed encoding.
Definition: encoding.c:188
rb_encoding * rb_find_encoding(VALUE obj)
Identical to rb_to_encoding_index(), except the return type.
Definition: encoding.c:336
int rb_define_dummy_encoding(const char *name)
Creates a new "dummy" encoding.
Definition: encoding.c:617
static unsigned int rb_enc_codepoint(const char *p, const char *e, rb_encoding *enc)
Queries the code point of character pointed by the passed pointer.
Definition: encoding.h:587
rb_encoding * rb_default_external_encoding(void)
Queries the "default external" encoding.
Definition: encoding.c:1637
int rb_locale_encindex(void)
Identical to rb_locale_encoding(), except it returns the encoding's index instead of the encoding its...
Definition: encoding.c:1553
int rb_char_to_option_kcode(int c, int *option, int *kcode)
Converts a character option to its encoding.
Definition: re.c:331
rb_encoding * rb_enc_check(VALUE str1, VALUE str2)
Identical to rb_enc_compatible(), except it raises an exception instead of returning NULL.
Definition: encoding.c:1097
int rb_enc_mbclen(const char *p, const char *e, rb_encoding *enc)
Queries the number of bytes of the character at the passed pointer.
Definition: encoding.c:1222
int rb_enc_capable(VALUE obj)
Queries if the passed object can have its encoding.
Definition: encoding.c:943
VALUE rb_enc_default_internal(void)
Identical to rb_default_internal_encoding(), except it returns the Ruby-level counterpart instance of...
Definition: encoding.c:1733
VALUE rb_enc_associate_index(VALUE obj, int encindex)
Identical to rb_enc_set_index(), except it additionally does contents fix-up depending on the passed ...
Definition: encoding.c:1038
rb_encoding * rb_enc_compatible(VALUE str1, VALUE str2)
Look for the "common" encoding between the two.
Definition: encoding.c:1176
int rb_enc_replicate(const char *name, rb_encoding *src)
Creates a new encoding, using the passed one as a template.
Definition: encoding.c:550
rb_encoding * rb_locale_encoding(void)
Queries the encoding that represents the current locale.
Definition: encoding.c:1573
rb_encoding * rb_usascii_encoding(void)
Queries the encoding that represents US-ASCII.
Definition: encoding.c:1539
void rb_enc_set_default_external(VALUE encoding)
Destructively assigns the passed encoding as the default external encoding.
Definition: encoding.c:1691
int rb_enc_find_index(const char *name)
Queries the index of the encoding.
Definition: encoding.c:881
int rb_enc_alias(const char *alias, const char *orig)
Registers an "alias" name.
Definition: encoding.c:721
static int rb_enc_code_to_mbclen(int c, rb_encoding *enc)
Identical to rb_enc_codelen(), except it returns 0 for invalid code points.
Definition: encoding.h:635
int rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc)
Queries the code point of character pointed by the passed pointer.
Definition: encoding.c:1246
int rb_usascii_encindex(void)
Identical to rb_usascii_encoding(), except it returns the encoding's index instead of the encoding it...
Definition: encoding.c:1545
VALUE rb_enc_reg_new(const char *ptr, long len, rb_encoding *enc, int opts)
Identical to rb_reg_new(), except it additionally takes an encoding.
Definition: re.c:3159
VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to)
Encoding conversion main routine.
Definition: string.c:1167
int rb_enc_str_coderange(VALUE str)
Scans the passed string to collect its code range.
Definition: string.c:775
VALUE rb_enc_uint_chr(unsigned int code, rb_encoding *enc)
Encodes the passed code point into a series of bytes.
Definition: numeric.c:3747
VALUE rb_enc_str_new_static(const char *ptr, long len, rb_encoding *enc)
Identical to rb_enc_str_new(), except it takes a C string literal.
Definition: string.c:1033
char * rb_enc_nth(const char *head, const char *tail, long nth, rb_encoding *enc)
Queries the n-th character.
Definition: string.c:2674
VALUE rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts)
Identical to rb_str_conv_enc(), except it additionally takes IO encoder options.
Definition: string.c:1052
VALUE rb_enc_interned_str(const char *ptr, long len, rb_encoding *enc)
Identical to rb_enc_str_new(), except it returns a "f"string.
Definition: string.c:11816
long rb_memsearch(const void *x, long m, const void *y, long n, rb_encoding *enc)
Looks for the passed string in the passed buffer.
Definition: re.c:249
long rb_enc_strlen(const char *head, const char *tail, rb_encoding *enc)
Counts the number of characters of the passed string, according to the passed encoding.
Definition: string.c:2020
VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc)
Identical to rb_str_cat(), except it additionally takes an encoding.
Definition: string.c:3213
VALUE rb_enc_str_new_cstr(const char *ptr, rb_encoding *enc)
Identical to rb_enc_str_new(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:979
VALUE rb_enc_str_new(const char *ptr, long len, rb_encoding *enc)
Identical to rb_enc_str_new(), except it additionally takes an encoding.
Definition: string.c:939
VALUE rb_str_export_to_enc(VALUE obj, rb_encoding *enc)
Identical to rb_str_export(), except it additionally takes an encoding.
Definition: string.c:1272
VALUE rb_external_str_new_with_enc(const char *ptr, long len, rb_encoding *enc)
Identical to rb_external_str_new(), except it additionally takes an encoding.
Definition: string.c:1173
int rb_enc_str_asciionly_p(VALUE str)
Queries if the passed string is "ASCII only".
Definition: string.c:789
VALUE rb_obj_encoding(VALUE obj)
Identical to rb_enc_get_index(), except the return type.
Definition: encoding.c:1206
VALUE rb_enc_interned_str_cstr(const char *ptr, rb_encoding *enc)
Identical to rb_enc_str_new_cstr(), except it returns a "f"string.
Definition: string.c:11827
long rb_str_coderange_scan_restartable(const char *str, const char *end, rb_encoding *enc, int *cr)
Scans the passed string until it finds something odd.
Definition: string.c:667
int rb_enc_symname_p(const char *str, rb_encoding *enc)
Identical to rb_symname_p(), except it additionally takes an encoding.
Definition: symbol.c:203
ID rb_intern3(const char *name, long len, rb_encoding *enc)
Identical to rb_intern2(), except it additionally takes an encoding.
Definition: symbol.c:711
VALUE rb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc)
Identical to rb_check_id_cstr(), except for the return type.
Definition: symbol.c:1162
int rb_enc_symname2_p(const char *name, long len, rb_encoding *enc)
Identical to rb_enc_symname_p(), except it additionally takes the passed string's length.
Definition: symbol.c:406
ID rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc)
Identical to rb_check_id(), except it takes a pointer to a memory region instead of Ruby's string.
Definition: symbol.c:1151
int rb_econv_prepare_options(VALUE opthash, VALUE *ecopts, int ecflags)
Identical to rb_econv_prepare_opts(), except it additionally takes the initial value of flags.
Definition: transcode.c:2537
VALUE rb_econv_open_exc(const char *senc, const char *denc, int ecflags)
Creates a rb_eConverterNotFoundError exception object (but does not raise).
Definition: transcode.c:2039
const char * rb_econv_encoding_to_insert_output(rb_econv_t *ec)
Queries an encoding name which best suits for rb_econv_insert_output()'s last parameter.
Definition: transcode.c:1506
int rb_econv_prepare_opts(VALUE opthash, VALUE *ecopts)
Splits a keyword arguments hash (that for instance String#encode took) into a set of enum ruby_econv_...
Definition: transcode.c:2582
rb_econv_result_t rb_econv_convert(rb_econv_t *ec, const unsigned char **source_buffer_ptr, const unsigned char *source_buffer_end, unsigned char **destination_buffer_ptr, unsigned char *destination_buffer_end, int flags)
Converts a string from an encoding to another.
Definition: transcode.c:1449
rb_econv_result_t
return value of rb_econv_convert()
Definition: transcode.h:30
@ econv_incomplete_input
The conversion stopped in middle of reading a character, possibly due to a partial read of a socket e...
Definition: transcode.h:69
@ econv_finished
The conversion stopped after converting everything.
Definition: transcode.h:57
@ econv_undefined_conversion
The conversion stopped when it found a character in the input which cannot be representable in the ou...
Definition: transcode.h:41
@ econv_after_output
The conversion stopped after writing something to somewhere, before reading everything.
Definition: transcode.h:63
@ econv_source_buffer_empty
The conversion stopped because there is no input.
Definition: transcode.h:51
@ econv_destination_buffer_full
The conversion stopped because there is no destination.
Definition: transcode.h:46
@ econv_invalid_byte_sequence
The conversion stopped when it found an invalid sequence.
Definition: transcode.h:35
int rb_econv_putbackable(rb_econv_t *ec)
Queries if rb_econv_putback() makes sense, i.e.
Definition: transcode.c:1745
int rb_econv_has_convpath_p(const char *from_encoding, const char *to_encoding)
Queries if there is more than one way to convert between the passed two encodings.
Definition: transcode.c:3139
rb_econv_t * rb_econv_open(const char *source_encoding, const char *destination_encoding, int ecflags)
Creates a new instance of struct rb_econv_t.
Definition: transcode.c:1072
VALUE rb_econv_str_append(rb_econv_t *ec, VALUE src, VALUE dst, int flags)
Identical to rb_econv_str_convert(), except it appends the conversion result to the additionally pass...
Definition: transcode.c:1868
VALUE rb_econv_substr_append(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, VALUE dst, int flags)
Identical to rb_econv_str_append(), except it appends only a part of the passed string with conversio...
Definition: transcode.c:1859
const char * rb_econv_asciicompat_encoding(const char *encname)
Queries the passed encoding's corresponding ASCII compatible encoding.
Definition: transcode.c:1789
int rb_econv_insert_output(rb_econv_t *ec, const unsigned char *str, size_t len, const char *str_encoding)
Appends the passed string to the passed converter's output buffer.
Definition: transcode.c:1590
VALUE rb_econv_str_convert(rb_econv_t *ec, VALUE src, int flags)
Identical to rb_econv_convert(), except it takes Ruby's string instead of C's pointer.
Definition: transcode.c:1880
rb_econv_t * rb_econv_open_opts(const char *source_encoding, const char *destination_encoding, int ecflags, VALUE ecopts)
Identical to rb_econv_open(), except it additionally takes a hash of optional strings.
Definition: transcode.c:2588
int rb_econv_decorate_at_last(rb_econv_t *ec, const char *decorator_name)
Identical to rb_econv_decorate_at_first(), except it adds to the opposite direction.
Definition: transcode.c:1928
void rb_econv_binmode(rb_econv_t *ec)
This badly named function does not set the destination encoding to binary, but instead just nullifies...
Definition: transcode.c:1945
int rb_econv_decorate_at_first(rb_econv_t *ec, const char *decorator_name)
"Decorate"s a converter.
Definition: transcode.c:1911
VALUE rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts)
Converts the contents of the passed string from its encoding to the passed one.
Definition: transcode.c:2842
VALUE rb_econv_make_exception(rb_econv_t *ec)
This function makes sense right after rb_econv_convert() returns.
Definition: transcode.c:4198
void rb_econv_check_error(rb_econv_t *ec)
This is a rb_econv_make_exception() + rb_exc_raise() combo.
Definition: transcode.c:4204
VALUE rb_econv_substr_convert(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, int flags)
Identical to rb_econv_str_convert(), except it converts only a part of the passed string.
Definition: transcode.c:1874
void rb_econv_close(rb_econv_t *ec)
Destructs a converter.
Definition: transcode.c:1705
VALUE rb_econv_append(rb_econv_t *ec, const char *bytesrc, long bytesize, VALUE dst, int flags)
Converts the passed C's pointer according to the passed converter, then append the conversion result ...
Definition: transcode.c:1816
void rb_econv_putback(rb_econv_t *ec, unsigned char *p, int n)
Puts back the bytes.
Definition: transcode.c:1756
int rb_econv_set_replacement(rb_econv_t *ec, const unsigned char *str, size_t len, const char *encname)
Assigns the replacement string.
Definition: transcode.c:2201
VALUE rb_eval_string_wrap(const char *str, int *state)
Identical to rb_eval_string_protect(), except it evaluates the given string under a module binding in...
Definition: vm_eval.c:1868
VALUE rb_funcall_passing_block(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv_public(), except you can pass the passed block.
Definition: vm_eval.c:1165
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition: vm_eval.c:1102
VALUE rb_funcallv_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_funcallv(), except you can specify how to handle the last element of the given array.
Definition: vm_eval.c:1069
VALUE rb_funcallv(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcall(), except it takes the method arguments as a C array.
Definition: vm_eval.c:1061
VALUE rb_funcall_with_block(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE procval)
Identical to rb_funcallv_public(), except you can pass a block.
Definition: vm_eval.c:1179
VALUE rb_eval_string_protect(const char *str, int *state)
Identical to rb_eval_string(), except it avoids potential global escapes.
Definition: vm_eval.c:1847
VALUE rb_call_super_kw(int argc, const VALUE *argv, int kw_splat)
Identical to rb_call_super(), except you can specify how to handle the last element of the given arra...
Definition: vm_eval.c:330
VALUE rb_funcallv_public(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv(), except it only takes public methods into account.
Definition: vm_eval.c:1153
VALUE rb_current_receiver(void)
This resembles ruby's self.
Definition: vm_eval.c:344
VALUE rb_funcall_passing_block_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_funcallv_passing_block(), except you can specify how to handle the last element of th...
Definition: vm_eval.c:1172
VALUE rb_funcall_with_block_kw(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE procval, int kw_splat)
Identical to rb_funcallv_with_block(), except you can specify how to handle the last element of the g...
Definition: vm_eval.c:1189
VALUE rb_eval_string(const char *str)
Evaluates the given string in an isolated binding.
Definition: vm_eval.c:1835
VALUE rb_call_super(int argc, const VALUE *argv)
This resembles ruby's super.
Definition: vm_eval.c:338
VALUE rb_funcallv_public_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_funcallv_public(), except you can specify how to handle the last element of the given...
Definition: vm_eval.c:1159
void rb_gc_register_address(VALUE *valptr)
Inform the garbage collector that valptr points to a live Ruby object that should not be moved.
Definition: gc.c:8969
void rb_gc_unregister_address(VALUE *valptr)
Inform the garbage collector that a pointer previously passed to rb_gc_register_address() no longer p...
Definition: gc.c:8981
void rb_global_variable(VALUE *)
An alias for rb_gc_register_address().
Definition: gc.c:9004
void rb_gc_register_mark_object(VALUE object)
Inform the garbage collector that object is a live Ruby object that should not be moved.
Definition: gc.c:8948
VALUE rb_ary_rotate(VALUE ary, long rot)
Destructively rotates the passed array in-place to towards its end.
Definition: array.c:3251
VALUE rb_ary_new_from_values(long n, const VALUE *elts)
Identical to rb_ary_new_from_args(), except how objects are passed.
Definition: array.c:840
VALUE rb_ary_cmp(VALUE lhs, VALUE rhs)
Recursively compares each elements of the two arrays one-by-one using <=>.
Definition: array.c:5438
VALUE rb_ary_rassoc(VALUE alist, VALUE key)
Identical to rb_ary_assoc(), except it scans the passed array from the opposite direction.
Definition: array.c:5187
VALUE rb_ary_concat(VALUE lhs, VALUE rhs)
Destructively appends the contents of latter into the end of former.
Definition: array.c:5074
VALUE rb_ary_assoc(VALUE alist, VALUE key)
Looks up the passed key, assuming the passed array is an alist.
Definition: array.c:5157
VALUE rb_ary_reverse(VALUE ary)
Destructively reverses the passed array in-place.
Definition: array.c:3164
VALUE rb_ary_shared_with_p(VALUE lhs, VALUE rhs)
Queries if the passed two arrays share the same backend storage.
Definition: array.c:719
VALUE rb_ary_shift(VALUE ary)
Destructively deletes an element from the beginning of the passed array and returns what was deleted.
Definition: array.c:1526
VALUE rb_ary_sort(VALUE ary)
Creates a copy of the passed array, whose elements are sorted according to their <=> result.
Definition: array.c:3602
VALUE rb_ary_resurrect(VALUE ary)
I guess there is no use case of this function in extension libraries, but this is a routine identical...
Definition: array.c:2833
VALUE rb_ary_dup(VALUE ary)
Duplicates an array.
Definition: array.c:2820
VALUE rb_ary_includes(VALUE ary, VALUE elem)
Queries if the passed array has the passed entry.
Definition: array.c:5357
VALUE rb_ary_aref(int argc, const VALUE *argv, VALUE ary)
Queries element(s) of an array.
Definition: array.c:1903
VALUE rb_get_values_at(VALUE obj, long olen, int argc, const VALUE *argv, VALUE(*func)(VALUE obj, long oidx))
This was a generalisation of Array#values_at, Struct#values_at, and MatchData#values_at.
void rb_ary_free(VALUE ary)
Destroys the given array for no reason.
Definition: array.c:935
VALUE rb_ary_each(VALUE ary)
Iteratively yields each element of the passed array to the implicitly passed block if any.
Definition: array.c:2660
VALUE rb_ary_delete_at(VALUE ary, long pos)
Destructively removes an element which resides at the specific index of the passed array.
Definition: array.c:4160
VALUE rb_ary_unshift(VALUE ary, VALUE elem)
Destructively prepends the passed item at the beginning of the passed array.
Definition: array.c:1744
VALUE rb_ary_plus(VALUE lhs, VALUE rhs)
Creates a new array, concatenating the former to the latter.
Definition: array.c:5014
VALUE rb_ary_cat(VALUE ary, const VALUE *train, long len)
Destructively appends multiple elements at the end of the array.
Definition: array.c:1422
void rb_ary_modify(VALUE ary)
Declares that the array is about to be modified.
Definition: array.c:637
VALUE rb_ary_replace(VALUE copy, VALUE orig)
Replaces the contents of the former object with the contents of the latter.
Definition: array.c:4664
VALUE rb_check_array_type(VALUE obj)
Try converting an object to its array representation using its to_ary method, if any.
Definition: array.c:1061
VALUE rb_ary_to_ary(VALUE obj)
Force converts an object to an array.
Definition: array.c:2252
VALUE rb_ary_new(void)
Allocates a new, empty array.
Definition: array.c:801
VALUE rb_ary_new_capa(long capa)
Identical to rb_ary_new(), except it additionally specifies how many rooms of objects it should alloc...
Definition: array.c:795
VALUE rb_ary_resize(VALUE ary, long len)
Expands or shrinks the passed array to the passed length.
Definition: array.c:2346
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
Definition: array.c:1460
VALUE rb_ary_tmp_new(long capa)
Allocates a "temporary" array.
Definition: array.c:917
VALUE rb_ary_clear(VALUE ary)
Destructively removes everything form an array.
Definition: array.c:4720
VALUE rb_ary_subseq(VALUE ary, long beg, long len)
Obtains a part of the passed array.
Definition: array.c:1790
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
Definition: array.c:1409
VALUE rb_ary_freeze(VALUE obj)
Just another name of rb_obj_freeze.
Definition: array.c:706
VALUE rb_ary_to_s(VALUE ary)
Converts an array into a human-readable string.
Definition: array.c:3054
VALUE rb_ary_new_from_args(long n,...)
Constructs an array from the passed objects.
Definition: array.c:807
VALUE rb_ary_entry(VALUE ary, long off)
Queries an element of an array.
Definition: array.c:1762
VALUE rb_ary_sort_bang(VALUE ary)
Destructively sorts the passed array in-place, according to each elements' <=> result.
Definition: array.c:3499
VALUE rb_assoc_new(VALUE car, VALUE cdr)
Identical to rb_ary_new_from_values(), except it expects exactly two parameters.
Definition: array.c:1048
void rb_mem_clear(VALUE *buf, long len)
Fills the memory region with a series of RUBY_Qnil.
Definition: array.c:289
VALUE rb_ary_delete(VALUE ary, VALUE elem)
Destructively removes elements from the passed array, so that there would be no elements inside that ...
Definition: array.c:4106
VALUE rb_ary_join(VALUE ary, VALUE sep)
Recursively stringises the elements of the passed array, flattens that result, then joins the sequenc...
Definition: array.c:2934
void rb_ary_store(VALUE ary, long key, VALUE val)
Destructively stores the passed value to the passed array's passed index.
Definition: array.c:1245
int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
Exports an integer into a buffer.
Definition: bignum.c:3577
VALUE rb_big_lshift(VALUE x, VALUE y)
Performs shift left.
Definition: bignum.c:6636
VALUE rb_big_and(VALUE x, VALUE y)
Performs bitwise and of the passed two objects.
Definition: bignum.c:6375
VALUE rb_big_or(VALUE x, VALUE y)
Performs bitwise or of the passed two objects.
Definition: bignum.c:6494
VALUE rb_big_minus(VALUE x, VALUE y)
Performs subtraction of the passed two objects.
Definition: bignum.c:5868
VALUE rb_big_modulo(VALUE x, VALUE y)
Performs modulo of the passed two objects.
Definition: bignum.c:6118
VALUE rb_big_new(size_t len, int sign)
Allocates a bignum object.
Definition: bignum.c:3043
VALUE rb_big_pow(VALUE x, VALUE y)
Raises x to the powerof y.
Definition: bignum.c:6259
int rb_bigzero_p(VALUE x)
Queries if the passed bignum instance is a "bigzro".
Definition: bignum.c:2947
VALUE rb_big_plus(VALUE x, VALUE y)
Performs addition of the passed two objects.
Definition: bignum.c:5839
VALUE rb_str_to_inum(VALUE str, int base, int badcheck)
Identical to rb_cstr2inum(), except it takes Ruby's strings instead of C's.
Definition: bignum.c:4298
VALUE rb_big_clone(VALUE num)
Duplicates the given bignum.
Definition: bignum.c:3049
size_t rb_absint_size(VALUE val, int *nlz_bits_ret)
Calculates the number of bytes needed to represent the absolute value of the passed integer.
Definition: bignum.c:3276
size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret)
Calculates the number of words needed represent the absolute value of the passed integer.
Definition: bignum.c:3411
int rb_absint_singlebit_p(VALUE val)
Tests abs(val) consists only of a bit or not.
Definition: bignum.c:3476
VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
Import an integer from a buffer.
Definition: bignum.c:3663
unsigned long rb_big2ulong(VALUE x)
Converts a bignum into C's unsigned long.
Definition: bignum.c:5148
VALUE rb_big_idiv(VALUE x, VALUE y)
Performs "integer division".
Definition: bignum.c:6112
void rb_big_2comp(VALUE num)
Destructively modify the passed bignum into 2's complement representation.
Definition: bignum.c:3078
VALUE rb_big2str(VALUE x, int base)
Generates a place-value representation of the passed integer.
Definition: bignum.c:5114
VALUE rb_big_cmp(VALUE lhs, VALUE rhs)
Compares the passed two bignums.
Definition: bignum.c:5436
VALUE rb_str2inum(VALUE str, int base)
Identical to rb_str_to_inum(), except the second argument controls the base and badcheck at once.
Definition: bignum.c:4574
VALUE rb_dbl2big(double d)
Converts a C's double into a bignum.
Definition: bignum.c:5272
VALUE rb_big_mul(VALUE x, VALUE y)
Performs multiplication of the passed two objects.
Definition: bignum.c:5948
VALUE rb_big_eql(VALUE lhs, VALUE rhs)
Equality, in terms of eql?.
Definition: bignum.c:5560
VALUE rb_cstr2inum(const char *str, int base)
Identical to rb_cstr_to_inum(), except the second argument controls the base and badcheck at once.
Definition: bignum.c:4568
int rb_uv_to_utf8(char buf[6], unsigned long uv)
Encodes a Unicode codepoint into its UTF-8 representation.
Definition: pack.c:1637
VALUE rb_big_unpack(unsigned long *buf, long num_longs)
Constructs a (possibly very big) bignum from a series of integers.
Definition: bignum.c:3252
VALUE rb_big_divmod(VALUE x, VALUE y)
Performs "divmod" operation.
Definition: bignum.c:6150
VALUE rb_big_xor(VALUE x, VALUE y)
Performs exclusive or of the passed two objects.
Definition: bignum.c:6588
VALUE rb_big_div(VALUE x, VALUE y)
Performs division of the passed two objects.
Definition: bignum.c:6106
VALUE rb_big_norm(VALUE x)
Normalises the passed bignum.
Definition: bignum.c:3181
VALUE rb_cstr_to_inum(const char *str, int base, int badcheck)
Parses C's string to convert into a Ruby's integer.
Definition: bignum.c:4040
void rb_big_pack(VALUE val, unsigned long *buf, long num_longs)
Converts a bignum into a series of its parts.
Definition: bignum.c:3244
VALUE rb_big_rshift(VALUE x, VALUE y)
Performs shift right.
Definition: bignum.c:6666
double rb_big2dbl(VALUE x)
Converts a bignum into C's double.
Definition: bignum.c:5333
long rb_big2long(VALUE x)
Converts a bignum into C's long.
Definition: bignum.c:5163
void rb_big_resize(VALUE big, size_t len)
Destructively resizes the backend storage of the passed bignum.
Definition: bignum.c:3017
VALUE rb_big_eq(VALUE lhs, VALUE rhs)
Equality, in terms of ==.
Definition: bignum.c:5541
void rb_undef(VALUE mod, ID mid)
Inserts a method entry that hides previous method definition of the given name.
Definition: vm_method.c:1751
int rb_cmpint(VALUE val, VALUE a, VALUE b)
Canonicalises the passed val, which is the return value of a <=> b, into C's {-1, 0,...
Definition: bignum.c:2953
void rb_cmperr(VALUE a, VALUE b)
Raises "comparison failed" error.
Definition: compar.c:28
VALUE rb_complex_uminus(VALUE z)
Performs negation of the passed object.
Definition: complex.c:759
VALUE rb_complex_div(VALUE x, VALUE y)
Performs division of the passed two objects.
Definition: complex.c:949
VALUE rb_complex_new(VALUE real, VALUE imag)
Constructs a Complex, by first multiplying the imaginary part with 1i then adds it to the real part.
Definition: complex.c:1529
VALUE rb_complex_plus(VALUE x, VALUE y)
Performs addition of the passed two objects.
Definition: complex.c:779
VALUE rb_complex_new_polar(VALUE abs, VALUE arg)
Constructs a Complex using polar representations.
Definition: complex.c:1535
VALUE rb_complex_arg(VALUE z)
Queries the argument (or the angle) of the passed object.
Definition: complex.c:1209
VALUE rb_complex_raw(VALUE real, VALUE imag)
Identical to rb_complex_new(), except it assumes both arguments are not instances of rb_cComplex.
Definition: complex.c:1523
VALUE rb_dbl_complex_new(double real, double imag)
Identical to rb_complex_new(), except it takes the arguments as C's double instead of Ruby's object.
Definition: complex.c:1556
VALUE rb_complex_abs(VALUE z)
Queries the absolute (or the magnitude) of the passed object.
Definition: complex.c:1162
VALUE rb_complex_real(VALUE z)
Queries the real part of the passed Complex.
Definition: complex.c:727
VALUE rb_complex_mul(VALUE x, VALUE y)
Performs multiplication of the passed two objects.
Definition: complex.c:873
VALUE rb_complex_conjugate(VALUE z)
Performs complex conjugation of the passed object.
Definition: complex.c:1255
VALUE rb_Complex(VALUE real, VALUE imag)
Converts various values into a Complex.
Definition: complex.c:1547
VALUE rb_complex_minus(VALUE x, VALUE y)
Performs subtraction of the passed two objects.
Definition: complex.c:813
VALUE rb_complex_pow(VALUE base, VALUE exp)
Performs exponentiation of the passed two objects.
Definition: complex.c:986
VALUE rb_complex_imag(VALUE z)
Queries the imaginary part of the passed Complex.
Definition: complex.c:744
VALUE rb_fiber_current(void)
Queries the fiber which is calling this function.
Definition: cont.c:2254
VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat)
Identical to rb_fiber_yield(), except you can specify how to handle the last element of the given arr...
Definition: cont.c:2503
VALUE rb_fiber_resume_kw(VALUE fiber, int argc, const VALUE *argv, int kw_splat)
Identical to rb_fiber_resume(), except you can specify how to handle the last element of the given ar...
Definition: cont.c:2491
VALUE rb_fiber_alive_p(VALUE fiber)
Queries the liveness of the passed fiber.
Definition: cont.c:2531
VALUE rb_fiber_new(rb_block_call_func_t func, VALUE callback_obj)
Creates a Fiber instance from a C-backended block.
Definition: cont.c:1969
VALUE rb_obj_is_fiber(VALUE obj)
Queries if an object is a fiber.
Definition: cont.c:1135
VALUE rb_fiber_yield(int argc, const VALUE *argv)
Yields the control back to the point where the current fiber was resumed.
Definition: cont.c:2509
VALUE rb_fiber_resume(VALUE fiber, int argc, const VALUE *argv)
Resumes the execution of the passed fiber, either from the point at which the last rb_fiber_yield() w...
Definition: cont.c:2497
VALUE rb_dir_getwd(void)
Queries the path of the current working directory of the current process.
Definition: dir.c:1124
VALUE rb_enum_values_pack(int argc, const VALUE *argv)
Basically identical to rb_ary_new_form_values(), except it returns something different when argc < 2.
Definition: enum.c:53
VALUE rb_arithmetic_sequence_beg_len_step(VALUE as, long *begp, long *lenp, long *stepp, long len, int err)
Identical to rb_range_beg_len(), except it takes an instance of Enumerator::ArithmericSequence.
Definition: enumerator.c:3447
VALUE rb_enumeratorize_with_size(VALUE recv, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *func)
Identical to rb_enumeratorize(), except you can additionally specify the size function of return valu...
Definition: enumerator.c:536
VALUE rb_enumeratorize(VALUE recv, VALUE meth, int argc, const VALUE *argv)
Constructs an enumerator.
Definition: enumerator.c:511
VALUE rb_enumeratorize_with_size_kw(VALUE recv, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *func, int kw_splat)
Identical to rb_enumeratorize_with_func(), except you can specify how to handle the last element of t...
Definition: enumerator.c:520
int rb_arithmetic_sequence_extract(VALUE as, rb_arithmetic_sequence_components_t *buf)
Extracts components of the passed arithmetic sequence.
Definition: enumerator.c:3429
VALUE rb_enumerator_size_func(VALUE recv, VALUE argv, VALUE eobj)
This is the type of functions that rb_enumeratorize_with_size() expects.
Definition: enumerator.h:45
static void rb_check_frozen_inline(VALUE obj)
Just another name of rb_check_frozen.
Definition: error.h:256
static int rb_check_arity(int argc, int min, int max)
Ensures that the passed integer is in the passed range.
Definition: error.h:280
ID rb_frame_callee(void)
Identical to rb_frame_this_func(), except it returns the named used to call the method.
Definition: eval.c:1042
ID rb_frame_this_func(void)
Queries the name of the Ruby level method that is calling this function.
Definition: eval.c:1036
void rb_obj_call_init(VALUE obj, int argc, const VALUE *argv)
Calls initialize method of the passed object with the passed arguments.
Definition: eval.c:1663
VALUE rb_f_abort(int argc, const VALUE *argv)
This is similar to rb_f_exit().
Definition: process.c:4581
void rb_interrupt(void)
Raises an instance of rb_eInterrupt.
Definition: eval.c:690
VALUE rb_f_exit(int argc, const VALUE *argv)
Identical to rb_exit(), except how arguments are passed.
Definition: process.c:4516
VALUE rb_make_exception(int argc, const VALUE *argv)
Constructs an exception object from the list of arguments, in a manner similar to Ruby's raise.
Definition: eval.c:818
void rb_jump_tag(int state)
This function is to re-throw global escapes.
Definition: eval.c:842
void rb_obj_call_init_kw(VALUE, int, const VALUE *, int)
Identical to rb_obj_call_init(), except you can specify how to handle the last element of the given a...
Definition: eval.c:1669
void rb_set_end_proc(void(*func)(VALUE arg), VALUE arg)
Registers a function that shall run on process exit.
VALUE rb_find_file(VALUE path)
Identical to rb_find_file_ext(), except it takes a feature name and is extension at once,...
Definition: file.c:6467
VALUE rb_file_s_absolute_path(int argc, const VALUE *argv)
Identical to rb_file_absolute_path(), except how arguments are passed.
Definition: file.c:4141
VALUE rb_str_encode_ospath(VALUE path)
Converts a string into an "OS Path" encoding, if any.
Definition: file.c:251
int rb_is_absolute_path(const char *path)
Queries if the given path is an absolute path.
Definition: file.c:6232
int rb_find_file_ext(VALUE *feature, const char *const *exts)
Resolves a feature's path.
Definition: file.c:6408
VALUE rb_file_s_expand_path(int argc, const VALUE *argv)
Identical to rb_file_expand_path(), except how arguments are passed.
Definition: file.c:4093
VALUE rb_file_directory_p(VALUE _, VALUE path)
Queries if the given path is either a directory, or a symlink that (potentially recursively) points t...
Definition: file.c:1609
VALUE rb_file_expand_path(VALUE fname, VALUE dname)
Identical to rb_file_absolute_path(), except it additionally understands ~.
Definition: file.c:4080
VALUE rb_file_dirname(VALUE fname)
Strips a file path's last component (and trailing separators if any).
Definition: file.c:4747
VALUE rb_file_absolute_path(VALUE fname, VALUE dname)
Maps a relative path to its absolute representation.
Definition: file.c:4134
void rb_gc_mark(VALUE obj)
Marks an object.
Definition: gc.c:6900
void rb_mark_tbl_no_pin(struct st_table *tbl)
Identical to rb_mark_tbl(), except it marks objects using rb_gc_mark_movable().
Definition: gc.c:6687
void rb_memerror(void)
Triggers out-of-memory error.
Definition: gc.c:11610
size_t rb_gc_stat(VALUE key_or_buf)
Obtains various GC related profiles.
Definition: gc.c:10986
void rb_gc_mark_movable(VALUE obj)
Maybe this is the only function provided for C extensions to control the pinning of objects,...
Definition: gc.c:6894
VALUE rb_gc_disable(void)
Disables GC.
Definition: gc.c:11189
VALUE rb_gc_start(void)
Identical to rb_gc(), except the return value.
Definition: gc.c:10620
VALUE rb_gc_latest_gc_info(VALUE key_or_buf)
Obtains various info regarding the most recent GC run.
Definition: gc.c:10764
void rb_mark_tbl(struct st_table *tbl)
Identical to rb_mark_hash(), except it marks only values of the table and leave their associated keys...
Definition: gc.c:6681
VALUE rb_gc_enable(void)
(Re-) enables GC.
Definition: gc.c:11152
void rb_mark_hash(struct st_table *tbl)
Marks keys and values associated inside of the given table.
Definition: gc.c:6486
VALUE rb_undefine_finalizer(VALUE obj)
Modifies the object so that it has no finalisers at all.
Definition: gc.c:4049
int rb_during_gc(void)
Queries if the GC is busy.
Definition: gc.c:10635
void rb_gc_mark_maybe(VALUE obj)
Identical to rb_gc_mark(), except it allows the passed value be a non-object.
Definition: gc.c:6719
VALUE rb_gc_location(VALUE obj)
Finds a new "location" of an object.
Definition: gc.c:10035
void rb_gc_mark_locations(const VALUE *start, const VALUE *end)
Marks objects between the two pointers.
Definition: gc.c:6316
void rb_gc(void)
Triggers a GC process.
Definition: gc.c:10627
void rb_gc_force_recycle(VALUE obj)
Asserts that the passed object is no longer needed.
Definition: gc.c:8938
void rb_gc_update_tbl_refs(st_table *ptr)
Updates references inside of tables.
Definition: gc.c:9879
void rb_mark_set(struct st_table *tbl)
Identical to rb_mark_hash(), except it marks only keys of the table and leave their associated values...
Definition: gc.c:6422
VALUE rb_define_finalizer(VALUE obj, VALUE block)
Assigns a finaliser for an object.
Definition: gc.c:4201
void rb_gc_copy_finalizer(VALUE dst, VALUE src)
Copy&paste an object's finaliser to another.
Definition: gc.c:4209
void rb_gc_adjust_memory_usage(ssize_t diff)
Informs that there are external memory usages.
Definition: gc.c:12381
size_t rb_gc_count(void)
Identical to rb_gc_stat(), with "count" parameter.
Definition: gc.c:10659
VALUE rb_hash_size(VALUE hash)
Identical to RHASH_SIZE(), except it returns the size in Ruby's integer instead of C's.
Definition: hash.c:2980
void rb_hash_bulk_insert(long argc, const VALUE *argv, VALUE hash)
Inserts a list of key-value pairs into a hash table at once.
Definition: hash.c:4758
void rb_hash_foreach(VALUE hash, int(*func)(VALUE key, VALUE val, VALUE arg), VALUE arg)
Iterates over a hash.
VALUE rb_check_hash_type(VALUE obj)
Try converting an object to its hash representation using its to_hash method, if any.
Definition: hash.c:1902
void rb_st_foreach_safe(struct st_table *st, st_foreach_callback_func *func, st_data_t arg)
Identical to rb_st_foreach(), except it raises exceptions when the callback function tampers the tabl...
VALUE rb_hash_lookup2(VALUE hash, VALUE key, VALUE def)
Identical to rb_hash_lookup(), except you can specify what to return on misshits.
Definition: hash.c:2101
int rb_path_check(const char *path)
This function is mysterious.
Definition: file.c:6309
VALUE rb_hash_freeze(VALUE obj)
Just another name of rb_obj_freeze.
Definition: hash.c:87
VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value)
Type of callback functions to pass to rb_hash_update_by().
Definition: hash.h:269
VALUE rb_hash_delete(VALUE hash, VALUE key)
Deletes the passed key from the passed hash table, if any.
Definition: hash.c:2368
VALUE rb_hash_fetch(VALUE hash, VALUE key)
Identical to rb_hash_lookup(), except it yields the (implicitly) passed block instead of returning RU...
Definition: hash.c:2179
VALUE rb_hash_delete_if(VALUE hash)
Deletes each entry for which the block returns a truthy value.
Definition: hash.c:2530
VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func)
Destructively merges two hash tables into one.
Definition: hash.c:4015
VALUE rb_hash_aref(VALUE hash, VALUE key)
Queries the given key in the given hash table.
Definition: hash.c:2088
VALUE rb_hash_aset(VALUE hash, VALUE key, VALUE val)
Inserts or replaces ("upsert"s) the objects into the given hash table.
Definition: hash.c:2908
VALUE rb_env_clear(void)
Destructively removes every environment variables of the running process.
Definition: hash.c:5886
VALUE rb_hash_lookup(VALUE hash, VALUE key)
Identical to rb_hash_aref(), except it always returns RUBY_Qnil for misshits.
Definition: hash.c:2114
VALUE rb_hash_dup(VALUE hash)
Duplicates a hash.
Definition: hash.c:1591
VALUE rb_hash(VALUE obj)
Calculates a message authentication code of the passed object.
Definition: hash.c:227
VALUE rb_hash_clear(VALUE hash)
Swipes everything out of the passed hash table.
Definition: hash.c:2834
VALUE rb_hash_new(void)
Creates a new, empty hash object.
Definition: hash.c:1529
VALUE rb_io_printf(int argc, const VALUE *argv, VALUE io)
This is a rb_f_sprintf() + rb_io_write() combo.
Definition: io.c:8246
VALUE rb_io_gets(VALUE io)
Reads a "line" from the given IO.
Definition: io.c:3998
int rb_cloexec_pipe(int fildes[2])
Opens a pipe with closing on exec.
Definition: io.c:414
VALUE rb_rs
The record separator character for inputs, or the $/.
Definition: io.c:203
VALUE rb_io_print(int argc, const VALUE *argv, VALUE io)
Iterates over the passed array to apply rb_io_write() individually.
Definition: io.c:8371
VALUE rb_io_addstr(VALUE io, VALUE str)
Identical to rb_io_write(), except it always returns the passed IO.
Definition: io.c:2135
void rb_write_error(const char *str)
Writes the given error message to somewhere applicable.
Definition: io.c:8787
VALUE rb_io_ungetbyte(VALUE io, VALUE b)
Identical to rb_io_ungetc(), except it doesn't take the encoding of the passed IO into account.
Definition: io.c:4855
VALUE rb_io_getbyte(VALUE io)
Reads a byte from the given IO.
Definition: io.c:4763
VALUE rb_io_puts(int argc, const VALUE *argv, VALUE io)
Iterates over the passed array to apply rb_io_write() individually.
Definition: io.c:8601
int rb_cloexec_dup2(int oldfd, int newfd)
Identical to rb_cloexec_dup(), except you can specify the destination file descriptor.
Definition: io.c:361
VALUE rb_io_fdopen(int fd, int flags, const char *path)
Creates an IO instance whose backend is the given file descriptor.
Definition: io.c:8894
void rb_update_max_fd(int fd)
Informs the interpreter that the passed fd can be the max.
Definition: io.c:235
VALUE rb_io_write(VALUE io, VALUE str)
Writes the given string to the given IO.
Definition: io.c:2087
int rb_cloexec_open(const char *pathname, int flags, mode_t mode)
Opens a file that closes on exec.
Definition: io.c:315
VALUE rb_fs
The field separator character for inputs, or the $;.
Definition: string.c:552
VALUE rb_output_rs
The record separator character for outputs, or the $\.
Definition: io.c:204
VALUE rb_io_eof(VALUE io)
Queries if the passed IO is at the end of file.
Definition: io.c:2486
void rb_write_error2(const char *str, long len)
Identical to rb_write_error(), except it additionally takes the message's length.
Definition: io.c:8767
void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds)
Closes everything.
int rb_reserved_fd_p(int fd)
Queries if the given FD is reserved or not.
void rb_fd_fix_cloexec(int fd)
Sets or clears the close-on-exec flag of the passed file descriptor to the desired state.
Definition: io.c:285
VALUE rb_io_flush(VALUE io)
Flushes any buffered data within the passed IO to the underlying operating system.
Definition: io.c:2191
VALUE rb_io_ascii8bit_binmode(VALUE io)
Forces no conversions be applied to the passed IO.
Definition: io.c:5984
VALUE rb_io_binmode(VALUE io)
Sets the binmode.
Definition: io.c:5938
VALUE rb_io_ungetc(VALUE io, VALUE c)
"Unget"s a string.
Definition: io.c:4918
int rb_pipe(int *pipes)
This is an rb_cloexec_pipe() + rb_update_max_fd() combo.
Definition: io.c:6989
VALUE rb_gets(void)
Much like rb_io_gets(), but it reads from the mysterious ARGF object.
Definition: io.c:9724
int rb_cloexec_fcntl_dupfd(int fd, int minfd)
Duplicates a file descriptor with closing on exec.
Definition: io.c:448
VALUE rb_output_fs
The field separator character for outputs, or the $,.
Definition: io.c:202
VALUE rb_file_open_str(VALUE fname, const char *fmode)
Identical to rb_file_open(), except it takes the pathname as a Ruby's string instead of C's.
Definition: io.c:6872
int rb_cloexec_dup(int oldfd)
Identical to rb_cloexec_fcntl_dupfd(), except it implies minfd is 3.
Definition: io.c:354
VALUE rb_file_open(const char *fname, const char *fmode)
Opens a file located at the given path.
Definition: io.c:6879
VALUE rb_io_close(VALUE io)
Closes the IO.
Definition: io.c:5439
VALUE rb_default_rs
This is the default value of rb_rs, i.e.
Definition: io.c:205
void rb_provide(const char *feature)
Declares that the given feature is already provided by someone else.
Definition: load.c:671
VALUE rb_f_require(VALUE self, VALUE feature)
Identical to rb_require_string(), except it ignores the first argument for no reason.
Definition: load.c:939
void rb_ext_ractor_safe(bool flag)
Asserts that the extension library that calls this function is aware of Ractor.
Definition: load.c:1107
VALUE rb_require_string(VALUE feature)
Finds and loads the given feature, if absent.
Definition: load.c:1257
int rb_feature_provided(const char *feature, const char **loading)
Identical to rb_provided(), except it additionally returns the "canonical" name of the loaded feature...
Definition: load.c:643
void rb_load_protect(VALUE path, int wrap, int *state)
Identical to rb_load(), except it avoids potential global escapes.
Definition: load.c:768
int rb_provided(const char *feature)
Queries if the given feature has already been loaded into the execution context.
Definition: load.c:610
void rb_load(VALUE path, int wrap)
Loads and executes the Ruby program in the given file.
Definition: load.c:760
void rb_num_zerodiv(void)
Just always raises an exception.
Definition: numeric.c:200
VALUE rb_num2fix(VALUE val)
Converts a numeric value into a Fixnum.
Definition: numeric.c:3382
VALUE rb_fix2str(VALUE val, int base)
Generates a place-value representation of the given Fixnum, with given radix.
Definition: numeric.c:3853
VALUE rb_int_positive_pow(long x, unsigned long y)
Raises the passed x to the power of y.
Definition: numeric.c:4492
VALUE rb_dbl_cmp(double lhs, double rhs)
Compares two doubles.
Definition: numeric.c:1661
VALUE rb_num_coerce_bit(VALUE lhs, VALUE rhs, ID op)
This one is optimised for bitwise operations, but the API is identical to rb_num_coerce_bin().
Definition: numeric.c:4923
VALUE rb_num_coerce_relop(VALUE lhs, VALUE rhs, ID op)
Identical to rb_num_coerce_cmp(), except for return values.
Definition: numeric.c:493
VALUE rb_num_coerce_cmp(VALUE lhs, VALUE rhs, ID op)
Identical to rb_num_coerce_bin(), except for return values.
Definition: numeric.c:478
VALUE rb_num_coerce_bin(VALUE lhs, VALUE rhs, ID op)
Coerced binary operation.
Definition: numeric.c:471
VALUE rb_obj_id(VALUE obj)
Finds or creates an integer primary key of the given object.
Definition: gc.c:4712
VALUE rb_memory_id(VALUE obj)
Identical to rb_obj_id(), except it hesitates from allocating a new instance of rb_cInteger.
Definition: gc.c:4679
VALUE rb_backref_get(void)
Queries the last match, or Regexp.last_match, or the $~.
Definition: vm.c:1583
VALUE rb_sym_all_symbols(void)
Collects every single bits of symbols that have ever interned in the entire history of the current pr...
Definition: symbol.c:1002
int rb_is_global_id(ID id)
Classifies the given ID, then sees if it is a global variable.
Definition: symbol.c:1035
void rb_lastline_set(VALUE str)
Updates $_.
Definition: vm.c:1601
int rb_is_instance_id(ID id)
Classifies the given ID, then sees if it is an instance variable.
Definition: symbol.c:1041
int rb_is_const_id(ID id)
Classifies the given ID, then sees if it is a constant.
Definition: symbol.c:1023
int rb_is_junk_id(ID)
Classifies the given ID, then sees if it is a junk ID.
Definition: symbol.c:1059
int rb_symname_p(const char *str)
Sees if the passed C string constructs a valid syntactic symbol.
Definition: symbol.c:197
VALUE rb_lastline_get(void)
Queries the last line, or the $_.
Definition: vm.c:1595
ID rb_id_attrset(ID id)
Calculates an ID of attribute writer.
Definition: symbol.c:113
int rb_is_class_id(ID id)
Classifies the given ID, then sees if it is a class variable.
Definition: symbol.c:1029
int rb_is_attrset_id(ID id)
Classifies the given ID, then sees if it is an attribute writer.
Definition: symbol.c:1047
int rb_is_local_id(ID id)
Classifies the given ID, then sees if it is a local variable.
Definition: symbol.c:1053
void rb_backref_set(VALUE md)
Updates $~.
Definition: vm.c:1589
VALUE rb_method_call_with_block(int argc, const VALUE *argv, VALUE recv, VALUE proc)
Identical to rb_proc_call(), except you can additionally pass a proc as a block.
Definition: proc.c:2491
int rb_obj_method_arity(VALUE obj, ID mid)
Identical to rb_mod_method_arity(), except it searches for singleton methods rather than instance met...
Definition: proc.c:2857
VALUE rb_proc_call(VALUE recv, VALUE args)
Evaluates the passed proc with the passed arguments.
Definition: proc.c:1000
VALUE rb_proc_call_with_block_kw(VALUE recv, int argc, const VALUE *argv, VALUE proc, int kw_splat)
Identical to rb_proc_call_with_block(), except you can specify how to handle the last element of the ...
Definition: proc.c:1012
VALUE rb_method_call_kw(int argc, const VALUE *argv, VALUE recv, int kw_splat)
Identical to rb_method_call(), except you can specify how to handle the last element of the given arr...
Definition: proc.c:2448
VALUE rb_obj_method(VALUE recv, VALUE mid)
Creates a method object.
Definition: proc.c:2040
VALUE rb_proc_lambda_p(VALUE recv)
Queries if the given object is a lambda.
Definition: proc.c:290
VALUE rb_block_proc(void)
Constructs a Proc object from implicitly passed components.
Definition: proc.c:845
VALUE rb_proc_call_with_block(VALUE recv, int argc, const VALUE *argv, VALUE proc)
Identical to rb_proc_call(), except you can additionally pass another proc object,...
Definition: proc.c:1024
VALUE rb_protect(VALUE(*func)(VALUE args), VALUE args, int *state)
Protects a function call from potential global escapes from the function.
int rb_mod_method_arity(VALUE mod, ID mid)
Queries the number of mandatory arguments of the method defined in the given module.
Definition: proc.c:2849
VALUE rb_proc_new(rb_block_call_func_t func, VALUE callback_arg)
This is an rb_iterate() + rb_block_proc() combo.
Definition: proc.c:3285
VALUE rb_method_call_with_block_kw(int argc, const VALUE *argv, VALUE recv, VALUE proc, int kw_splat)
Identical to rb_method_call_with_block(), except you can specify how to handle the last element of th...
Definition: proc.c:2478
VALUE rb_obj_is_method(VALUE recv)
Queries if the given object is a method.
Definition: proc.c:1632
VALUE rb_block_lambda(void)
Identical to rb_proc_new(), except it returns a lambda.
Definition: proc.c:864
VALUE rb_proc_call_kw(VALUE recv, VALUE args, int kw_splat)
Identical to rb_proc_call(), except you can specify how to handle the last element of the given array...
Definition: proc.c:985
VALUE rb_binding_new(void)
Snapshots the current execution context and turn it into an instance of rb_cBinding.
Definition: proc.c:382
int rb_proc_arity(VALUE recv)
Queries the number of mandatory arguments of the given Proc.
Definition: proc.c:1131
VALUE rb_method_call(int argc, const VALUE *argv, VALUE recv)
Evaluates the passed method with the passed arguments.
Definition: proc.c:2455
VALUE rb_obj_is_proc(VALUE recv)
Queries if the given object is a proc.
Definition: proc.c:172
int rb_proc_exec(const char *cmd)
Executes a shell command.
Definition: process.c:1906
VALUE rb_proc_times(VALUE _)
Gathers info about resources consumed by the current process.
VALUE rb_last_status_get(void)
Queries the "last status", or the $?.
Definition: process.c:616
rb_pid_t rb_waitpid(rb_pid_t pid, int *status, int flags)
Waits for a process, with releasing GVL.
Definition: process.c:1458
rb_pid_t rb_spawn_err(int argc, const VALUE *argv, char *errbuf, size_t buflen)
Identical to rb_spawn(), except you can additionally know the detailed situation in case of abnormal ...
Definition: process.c:4757
void rb_syswait(rb_pid_t pid)
This is a shorthand of rb_waitpid without status and flags.
Definition: process.c:4626
VALUE rb_f_exec(int argc, const VALUE *argv)
Replaces the current process by running the given external command.
Definition: process.c:3123
rb_pid_t rb_spawn(int argc, const VALUE *argv)
Identical to rb_f_exec(), except it spawns a child process instead of replacing the current one.
Definition: process.c:4763
void rb_last_status_set(int status, rb_pid_t pid)
Sets the "last status", or the $?.
Definition: process.c:680
VALUE rb_detach_process(rb_pid_t pid)
"Detaches" a subprocess.
Definition: process.c:1661
unsigned long rb_genrand_ulong_limited(unsigned long i)
Generates a random number whose upper limit is i.
Definition: random.c:1044
double rb_random_real(VALUE rnd)
Identical to rb_genrand_real(), except it generates using the passed RNG.
Definition: random.c:1116
unsigned int rb_random_int32(VALUE rnd)
Identical to rb_genrand_int32(), except it generates using the passed RNG.
Definition: random.c:1073
void rb_reset_random_seed(void)
Resets the RNG behind rb_genrand_int32()/rb_genrand_real().
Definition: random.c:1755
VALUE rb_random_bytes(VALUE rnd, long n)
Generates a String of random bytes.
Definition: random.c:1274
double rb_genrand_real(void)
Generates a double random number.
Definition: random.c:199
unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit)
Identical to rb_genrand_ulong_limited(), except it generates using the passed RNG.
Definition: random.c:1176
unsigned int rb_genrand_int32(void)
Generates a 32 bit random number.
Definition: random.c:192
int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp)
Deconstructs a range into its components.
Definition: range.c:1490
VALUE rb_range_new(VALUE beg, VALUE end, int excl)
Creates a new Range.
Definition: range.c:67
VALUE rb_range_beg_len(VALUE range, long *begp, long *lenp, long len, int err)
Deconstructs a numerical range.
Definition: range.c:1578
VALUE rb_rational_raw(VALUE num, VALUE den)
Identical to rb_rational_new(), except it skips argument validations.
Definition: rational.c:1955
VALUE rb_rational_new(VALUE num, VALUE den)
Constructs a Rational, with reduction.
Definition: rational.c:1969
VALUE rb_Rational(VALUE num, VALUE den)
Converts various values into a Rational.
Definition: rational.c:1975
VALUE rb_rational_num(VALUE rat)
Queries the numerator of the passed Rational.
Definition: rational.c:1984
VALUE rb_flt_rationalize(VALUE flt)
Identical to rb_flt_rationalize_with_prec(), except it auto-detects appropriate precision depending o...
Definition: rational.c:2254
VALUE rb_flt_rationalize_with_prec(VALUE flt, VALUE prec)
Simplified approximation of a float.
Definition: rational.c:2238
VALUE rb_rational_den(VALUE rat)
Queries the denominator of the passed Rational.
Definition: rational.c:1990
int rb_reg_backref_number(VALUE match, VALUE backref)
Queries the index of the given named capture.
Definition: re.c:1224
int rb_reg_options(VALUE re)
Queries the options of the passed regular expression.
Definition: re.c:3855
VALUE rb_reg_last_match(VALUE md)
This just returns the argument, stringified.
Definition: re.c:1876
VALUE rb_reg_match(VALUE re, VALUE str)
This is the match operator.
Definition: re.c:3418
void rb_match_busy(VALUE md)
Asserts that the given MatchData is "occupied".
Definition: re.c:1430
VALUE rb_reg_nth_match(int n, VALUE md)
Queries the nth captured substring.
Definition: re.c:1851
VALUE rb_reg_match_post(VALUE md)
The portion of the original string after the given match.
Definition: re.c:1933
VALUE rb_reg_nth_defined(int n, VALUE md)
Identical to rb_reg_nth_match(), except it just returns Boolean.
Definition: re.c:1834
VALUE rb_reg_match_pre(VALUE md)
The portion of the original string before the given match.
Definition: re.c:1900
VALUE rb_reg_new_str(VALUE src, int opts)
Identical to rb_reg_new(), except it takes the expression in Ruby's string instead of C's.
Definition: re.c:3119
VALUE rb_reg_match_last(VALUE md)
The portion of the original string that captured at the very last.
Definition: re.c:1950
VALUE rb_reg_match2(VALUE re)
Identical to rb_reg_match(), except it matches against rb_lastline_get() (or, the $_).
Definition: re.c:3473
VALUE rb_reg_new(const char *src, long len, int opts)
Creates a new Regular expression.
Definition: re.c:3173
int rb_memcicmp(const void *s1, const void *s2, long n)
Identical to st_locale_insensitive_strcasecmp(), except it is timing safe and returns something diffe...
Definition: re.c:90
void ruby_default_signal(int sig)
Pretends as if there was no custom signal handler.
Definition: signal.c:407
const char * ruby_signal_name(int signo)
Queries the name of the signal.
Definition: signal.c:316
VALUE rb_f_kill(int argc, const VALUE *argv)
Sends a signal ("kills") to processes.
Definition: signal.c:423
VALUE rb_str_to_interned_str(VALUE str)
Identical to rb_interned_str(), except it takes a Ruby's string instead of C's.
Definition: string.c:11797
void rb_str_free(VALUE str)
Destroys the given string for no reason.
Definition: string.c:1532
#define rb_hash_uint(h, i)
Just another name of st_hash_uint.
Definition: string.h:942
VALUE rb_str_new_shared(VALUE str)
Identical to rb_str_new_cstr(), except it takes a Ruby's string instead of C's.
Definition: string.c:1335
VALUE rb_str_plus(VALUE lhs, VALUE rhs)
Generates a new string, concatenating the former to the latter.
Definition: string.c:2171
#define rb_hash_end(h)
Just another name of st_hash_end.
Definition: string.h:945
#define rb_hash_uint32(h, i)
Just another name of st_hash_uint32.
Definition: string.h:939
VALUE rb_utf8_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "UTF-8" encoding.
Definition: string.c:931
VALUE rb_str_append(VALUE dst, VALUE src)
Identical to rb_str_buf_append(), except it converts the right hand side before concatenating.
Definition: string.c:3259
VALUE rb_filesystem_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "filesystem" encoding.
Definition: string.c:1248
VALUE rb_utf8_str_new_cstr(const char *ptr)
Identical to rb_str_new_cstr(), except it generates a string of "UTF-8" encoding.
Definition: string.c:971
VALUE rb_sym_to_s(VALUE sym)
This is an rb_sym2str() + rb_str_dup() combo.
Definition: string.c:11426
VALUE rb_str_times(VALUE str, VALUE num)
Repetition of a string.
Definition: string.c:2243
VALUE rb_external_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "default external" encoding.
Definition: string.c:1224
VALUE rb_str_tmp_new(long len)
Allocates a "temporary" string.
Definition: string.c:1526
long rb_str_offset(VALUE str, long pos)
"Inverse" of rb_str_sublen().
Definition: string.c:2702
VALUE rb_str_succ(VALUE orig)
Searches for the "successor" of a string.
Definition: string.c:4714
int rb_str_hash_cmp(VALUE str1, VALUE str2)
Compares two strings.
Definition: string.c:3468
VALUE rb_str_subseq(VALUE str, long beg, long len)
Identical to rb_str_substr(), except the numbers are interpreted as byte offsets instead of character...
Definition: string.c:2760
VALUE rb_str_ellipsize(VALUE str, long len)
Shortens str and adds three dots, an ellipsis, if it is longer than len characters.
Definition: string.c:10719
st_index_t rb_memhash(const void *ptr, long len)
This is a universal hash function.
Definition: random.c:1720
void rb_str_shared_replace(VALUE dst, VALUE src)
Replaces the contents of the former with the latter.
Definition: string.c:1579
VALUE rb_str_new_static(const char *ptr, long len)
Identical to rb_str_new(), except it takes a C string literal.
Definition: string.c:1015
VALUE rb_str_buf_cat(VALUE, const char *, long)
Just another name of rb_str_cat.
size_t rb_str_capacity(VALUE str)
Queries the capacity of the given string.
Definition: string.c:827
VALUE rb_str_new_frozen(VALUE str)
Creates a frozen copy of the string, if necessary.
Definition: string.c:1341
VALUE rb_str_cat2(VALUE, const char *)
Just another name of rb_str_cat_cstr.
VALUE rb_str_dup(VALUE str)
Duplicates a string.
Definition: string.c:1794
void rb_str_modify(VALUE str)
Declares that the string is about to be modified.
Definition: string.c:2398
st_index_t rb_str_hash(VALUE str)
Calculates a hash value of a string.
Definition: string.c:3458
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition: string.c:3102
VALUE rb_str_locktmp(VALUE str)
Obtains a "temporary lock" of the string.
long rb_str_strlen(VALUE str)
Counts the number of characters (not bytes) that are stored inside of the given string.
Definition: string.c:2109
VALUE rb_str_resurrect(VALUE str)
I guess there is no use case of this function in extension libraries, but this is a routine identical...
Definition: string.c:1800
VALUE rb_usascii_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "US ASCII" encoding.
Definition: string.c:923
VALUE rb_str_replace(VALUE dst, VALUE src)
Replaces the contents of the former object with the stringised contents of the latter.
Definition: string.c:5917
VALUE rb_usascii_str_new_cstr(const char *ptr)
Identical to rb_str_new_cstr(), except it generates a string of "US ASCII" encoding.
Definition: string.c:963
VALUE rb_str_buf_cat2(VALUE, const char *)
Just another name of rb_str_cat_cstr.
char * rb_str_subpos(VALUE str, long beg, long *len)
Identical to rb_str_substr(), except it returns a C's string instead of Ruby's.
Definition: string.c:2783
rb_gvar_setter_t rb_str_setter
This is a rb_gvar_setter_t that refutes non-string assignments.
Definition: string.h:1146
VALUE rb_interned_str_cstr(const char *ptr)
Identical to rb_interned_str(), except it assumes the passed pointer is a pointer to a C's string.
Definition: string.c:11810
VALUE rb_filesystem_str_new_cstr(const char *ptr)
Identical to rb_filesystem_str_new(), except it assumes the passed pointer is a pointer to a C string...
Definition: string.c:1254
VALUE rb_str_buf_append(VALUE dst, VALUE src)
Identical to rb_str_cat_cstr(), except it takes Ruby's string instead of C's.
Definition: string.c:3244
long rb_str_sublen(VALUE str, long pos)
Byte offset to character offset conversion.
Definition: string.c:2749
VALUE rb_str_equal(VALUE str1, VALUE str2)
Equality of two strings.
Definition: string.c:3570
void rb_str_set_len(VALUE str, long len)
Overwrites the length of the string.
Definition: string.c:2980
st_index_t rb_hash_start(st_index_t i)
Starts a series of hashing.
Definition: random.c:1714
VALUE rb_str_inspect(VALUE str)
Generates a "readable" version of the receiver.
Definition: string.c:6602
void rb_must_asciicompat(VALUE obj)
Asserts that the given string's encoding is (Ruby's definition of) ASCII compatible.
Definition: string.c:2450
VALUE rb_str_buf_new_cstr(const char *ptr)
This is a rb_str_buf_new() + rb_str_buf_cat() combo.
Definition: string.c:1514
VALUE rb_interned_str(const char *ptr, long len)
Identical to rb_str_new(), except it returns an infamous "f"string.
Definition: string.c:11803
int rb_str_cmp(VALUE lhs, VALUE rhs)
Compares two strings, as in strcmp(3).
Definition: string.c:3524
VALUE rb_str_concat(VALUE dst, VALUE src)
Identical to rb_str_append(), except it also accepts an integer as a codepoint.
Definition: string.c:3360
int rb_str_comparable(VALUE str1, VALUE str2)
Checks if two strings are comparable each other or not.
Definition: string.c:3499
VALUE rb_str_buf_cat_ascii(VALUE dst, const char *src)
Identical to rb_str_cat_cstr(), except it additionally assumes the source string be a NUL terminated ...
Definition: string.c:3220
VALUE rb_str_freeze(VALUE str)
This is the implementation of String#freeze.
Definition: string.c:2902
void rb_str_update(VALUE dst, long beg, long len, VALUE src)
Replaces some (or all) of the contents of the given string.
Definition: string.c:5218
VALUE rb_str_new(const char *ptr, long len)
Allocates an instance of rb_cString.
Definition: string.c:917
VALUE rb_str_scrub(VALUE str, VALUE repl)
"Cleanses" the string.
Definition: string.c:10777
VALUE rb_str_dup_frozen(VALUE)
Just another name of rb_str_new_frozen.
VALUE rb_str_new_with_class(VALUE obj, const char *ptr, long len)
Identical to rb_str_new(), except it takes the class of the allocating object.
Definition: string.c:1473
VALUE rb_locale_str_new_cstr(const char *ptr)
Identical to rb_locale_str_new(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:1242
VALUE rb_check_string_type(VALUE obj)
Try converting an object to its stringised representation using its to_str method,...
Definition: string.c:2598
VALUE rb_str_substr(VALUE str, long beg, long len)
This is the implementation of two-argumented String#slice.
Definition: string.c:2870
VALUE rb_str_unlocktmp(VALUE str)
Releases a lock formerly obtained by rb_str_locktmp().
Definition: string.c:2963
VALUE rb_str_new_cstr(const char *ptr)
Identical to rb_str_new(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:951
VALUE rb_str_resize(VALUE str, long len)
Overwrites the length of the string.
Definition: string.c:2997
VALUE rb_utf8_str_new_static(const char *ptr, long len)
Identical to rb_str_new_static(), except it generates a string of "UTF-8" encoding instead of "binary...
Definition: string.c:1027
void rb_str_modify_expand(VALUE str, long capa)
Identical to rb_str_modify(), except it additionally expands the capacity of the receiver.
Definition: string.c:2406
VALUE rb_str_dump(VALUE str)
"Inverse" of rb_eval_string().
Definition: string.c:6713
VALUE rb_locale_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "locale" encoding.
Definition: string.c:1236
VALUE rb_str_buf_new(long capa)
Allocates a "string buffer".
Definition: string.c:1492
VALUE rb_external_str_new_cstr(const char *ptr)
Identical to rb_external_str_new(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:1230
VALUE rb_str_length(VALUE)
Identical to rb_str_strlen(), except it returns the value in rb_cInteger.
Definition: string.c:2123
VALUE rb_str_cat_cstr(VALUE dst, const char *src)
Identical to rb_str_cat(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:3112
VALUE rb_str_drop_bytes(VALUE str, long len)
Shrinks the given string for the given number of bytes.
Definition: string.c:5144
VALUE rb_str_split(VALUE str, const char *delim)
Divides the given string based on the given delimiter.
Definition: string.c:8781
VALUE rb_usascii_str_new_static(const char *ptr, long len)
Identical to rb_str_new_static(), except it generates a string of "US ASCII" encoding instead of "bin...
Definition: string.c:1021
VALUE rb_str_intern(VALUE str)
Identical to rb_to_symbol(), except it assumes the receiver being an instance of RString.
Definition: symbol.c:837
VALUE rb_obj_as_string(VALUE obj)
Try converting an object to its stringised representation using its to_s method, if any.
Definition: string.c:1643
VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc,...)
Identical to rb_struct_define_without_accessor(), except it defines the class under the specified nam...
Definition: struct.c:410
VALUE rb_struct_define_under(VALUE space, const char *name,...)
Identical to rb_struct_define(), except it defines the class under the specified namespace instead of...
Definition: struct.c:451
VALUE rb_struct_new(VALUE klass,...)
Creates an instance of the given struct.
Definition: struct.c:805
VALUE rb_struct_initialize(VALUE self, VALUE values)
Mass-assigns a struct's fields.
Definition: struct.c:732
VALUE rb_struct_define_without_accessor(const char *name, VALUE super, rb_alloc_func_t func,...)
Identical to rb_struct_define(), except it does not define accessor methods.
Definition: struct.c:423
VALUE rb_struct_define(const char *name,...)
Defines a struct class.
Definition: struct.c:436
VALUE rb_struct_alloc(VALUE klass, VALUE values)
Identical to rb_struct_new(), except it takes the field values as a Ruby array.
Definition: struct.c:799
VALUE rb_struct_alloc_noinit(VALUE klass)
Allocates an instance of the given class.
Definition: struct.c:353
VALUE rb_struct_s_members(VALUE klass)
Queries the list of the names of the fields of the given struct class.
Definition: struct.c:64
VALUE rb_struct_members(VALUE self)
Queries the list of the names of the fields of the class of the given struct object.
Definition: struct.c:78
VALUE rb_struct_getmember(VALUE self, ID key)
Identical to rb_struct_aref(), except it takes ID instead of VALUE.
Definition: struct.c:229
int rb_thread_interrupted(VALUE thval)
Checks if the thread's execution was recently interrupted.
Definition: thread.c:1399
VALUE rb_thread_local_aref(VALUE thread, ID key)
This badly named function reads from a Fiber local storage.
Definition: thread.c:3314
VALUE rb_mutex_new(void)
Creates a mutex.
Definition: thread_sync.c:172
int rb_thread_fd_writable(int fd)
Identical to rb_thread_wait_fd(), except it blocks the current thread until the given file descriptor...
Definition: io.c:1397
VALUE rb_thread_kill(VALUE thread)
Terminates the given thread.
Definition: thread.c:2507
VALUE rb_thread_main(void)
Obtains the "main" thread.
Definition: thread.c:2746
VALUE rb_exec_recursive(VALUE(*f)(VALUE g, VALUE h, int r), VALUE g, VALUE h)
"Recursion" API entry point.
void rb_thread_sleep_forever(void)
Blocks indefinitely.
Definition: thread.c:1328
void rb_thread_fd_close(int fd)
Notifies a closing of a file descriptor to other threads.
Definition: thread.c:2447
void rb_thread_wait_for(struct timeval time)
Identical to rb_thread_sleep(), except it takes struct timeval instead.
Definition: thread.c:1367
VALUE rb_mutex_trylock(VALUE mutex)
Attempts to lock the mutex, without waiting for other threads to unlock it.
Definition: thread_sync.c:233
VALUE rb_mutex_locked_p(VALUE mutex)
Queries if there are any threads that holds the lock.
Definition: thread_sync.c:184
VALUE rb_mutex_synchronize(VALUE mutex, VALUE(*func)(VALUE arg), VALUE arg)
Obtains the lock, runs the passed function, and releases the lock when it completes.
Definition: thread_sync.c:597
VALUE rb_thread_stop(void)
Stops the current thread.
Definition: thread.c:2658
VALUE rb_mutex_sleep(VALUE self, VALUE timeout)
Releases the lock held in the mutex and waits for the period of time; reacquires the lock on wakeup.
Definition: thread_sync.c:530
VALUE rb_exec_recursive_paired(VALUE(*f)(VALUE g, VALUE h, int r), VALUE g, VALUE p, VALUE h)
Identical to rb_exec_recursive(), except it checks for the recursion on the ordered pair of { g,...
void rb_unblock_function_t(void *)
This is the type of UBFs.
Definition: thread.h:337
void rb_thread_atfork_before_exec(void)
:FIXME: situation of this function is unclear.
Definition: thread.c:4620
VALUE rb_thread_create(VALUE(*f)(void *g), void *g)
Creates a Ruby thread that is backended by a C function.
void rb_thread_check_ints(void)
Checks for interrupts.
Definition: thread.c:1382
VALUE rb_thread_run(VALUE thread)
This is a rb_thread_wakeup() + rb_thread_schedule() combo.
Definition: thread.c:2649
VALUE rb_thread_wakeup(VALUE thread)
Marks a given thread as eligible for scheduling.
Definition: thread.c:2602
VALUE rb_mutex_unlock(VALUE mutex)
Releases the mutex.
Definition: thread_sync.c:468
VALUE rb_exec_recursive_paired_outer(VALUE(*f)(VALUE g, VALUE h, int r), VALUE g, VALUE p, VALUE h)
Identical to rb_exec_recursive_outer(), except it checks for the recursion on the ordered pair of { g...
void rb_thread_sleep_deadly(void)
Identical to rb_thread_sleep_forever(), except the thread calling this function is considered "dead" ...
Definition: thread.c:1335
void rb_thread_atfork(void)
A pthread_atfork(3posix)-like API.
Definition: thread.c:4615
VALUE rb_thread_current(void)
Obtains the "current" thread.
Definition: thread.c:2725
int rb_thread_alone(void)
Checks if the thread this function is running is the only thread that is currently alive.
Definition: thread.c:3586
int rb_thread_wait_fd(int fd)
Blocks the current thread until the given file descriptor is ready to be read.
Definition: io.c:1391
VALUE rb_thread_local_aset(VALUE thread, ID key, VALUE val)
This badly named function writes to a Fiber local storage.
Definition: thread.c:3462
void rb_thread_schedule(void)
Tries to switch to another thread.
Definition: thread.c:1430
VALUE rb_thread_wakeup_alive(VALUE thread)
Identical to rb_thread_wakeup(), except it doesn't raise on an already killed thread.
Definition: thread.c:2611
VALUE rb_mutex_lock(VALUE mutex)
Attempts to lock the mutex.
Definition: thread_sync.c:395
void rb_thread_sleep(int sec)
Blocks for the given period of time.
Definition: thread.c:1405
VALUE rb_time_nano_new(time_t sec, long nsec)
Identical to rb_time_new(), except it accepts the time in nanoseconds resolution.
Definition: time.c:2482
void rb_timespec_now(struct timespec *ts)
Fills the current time into the given struct.
Definition: time.c:1896
VALUE rb_time_timespec_new(const struct timespec *ts, int offset)
Creates an instance of rb_cTime, with given time and offset.
Definition: time.c:2488
struct timespec rb_time_timespec(VALUE time)
Identical to rb_time_timeval(), except for return type.
Definition: time.c:2651
VALUE rb_time_new(time_t sec, long usec)
Creates an instance of rb_cTime with the given time and the local timezone.
Definition: time.c:2474
struct timeval rb_time_timeval(VALUE time)
Converts an instance of rb_cTime to a struct timeval that represents the identical point of time.
Definition: time.c:2634
struct timeval rb_time_interval(VALUE num)
Creates a "time interval".
Definition: time.c:2628
VALUE rb_time_num_new(VALUE timev, VALUE off)
Identical to rb_time_timespec_new(), except it takes Ruby values instead of C structs.
Definition: time.c:2511
VALUE rb_time_utc_offset(VALUE time)
Queries the offset, in seconds between the time zone of the time and the UTC.
Definition: time.c:4694
struct timespec rb_time_timespec_interval(VALUE num)
Identical to rb_time_interval(), except for return type.
Definition: time.c:2665
VALUE rb_mod_remove_cvar(VALUE mod, VALUE name)
Resembles Module#remove_class_variable.
Definition: variable.c:3859
VALUE rb_obj_instance_variables(VALUE obj)
Resembles Object#instance_variables.
Definition: variable.c:1903
VALUE rb_f_untrace_var(int argc, const VALUE *argv)
Deletes the passed tracer from the passed global variable, or if omitted, deletes everything.
Definition: variable.c:674
VALUE rb_const_get(VALUE space, ID name)
Identical to rb_const_defined(), except it returns the actual defined value.
Definition: variable.c:2850
VALUE rb_const_list(void *)
This is another mysterious API that comes with no documents at all.
Definition: variable.c:3070
VALUE rb_path2class(const char *path)
Resolves a Q::W::E::R-style path string to the actual class it points.
Definition: variable.c:305
VALUE rb_autoload_p(VALUE space, ID name)
Queries if an autoload is defined at a point.
Definition: variable.c:2723
VALUE rb_attr_get(VALUE obj, ID name)
Identical to rb_ivar_get()
Definition: variable.c:1310
void rb_set_class_path(VALUE klass, VALUE space, const char *name)
Names a class.
Definition: variable.c:252
VALUE rb_ivar_set(VALUE obj, ID name, VALUE val)
Identical to rb_iv_set(), except it accepts the name as an ID instead of a C string.
Definition: variable.c:1592
VALUE rb_mod_remove_const(VALUE space, VALUE name)
Resembles Module#remove_const.
Definition: variable.c:2942
VALUE rb_class_path_cached(VALUE mod)
Just another name of rb_mod_name.
Definition: variable.c:198
VALUE rb_f_trace_var(int argc, const VALUE *argv)
Traces a global variable.
Definition: variable.c:628
void rb_cvar_set(VALUE klass, ID name, VALUE val)
Assigns a value to a class variable.
Definition: variable.c:3624
VALUE rb_cvar_get(VALUE klass, ID name)
Obtains a value from a class variable.
Definition: variable.c:3693
VALUE rb_mod_constants(int argc, const VALUE *argv, VALUE recv)
Resembles Module#constants.
Definition: variable.c:3102
VALUE rb_path_to_class(VALUE path)
Identical to rb_path2class(), except it accepts the path as Ruby's string instead of C's.
Definition: variable.c:260
VALUE rb_ivar_get(VALUE obj, ID name)
Identical to rb_iv_get(), except it accepts the name as an ID instead of a C string.
Definition: variable.c:1302
void rb_ivar_foreach(VALUE obj, int(*func)(ID name, VALUE val, st_data_t arg), st_data_t arg)
Iterates over an object's instance variables.
void rb_const_set(VALUE space, ID name, VALUE val)
Names a constant.
Definition: variable.c:3303
VALUE rb_autoload_load(VALUE space, ID name)
Kicks the autoload procedure as if it was "touched".
Definition: variable.c:2685
VALUE rb_mod_name(VALUE mod)
Queries the name of a module.
Definition: variable.c:138
VALUE rb_class_name(VALUE obj)
Queries the name of the given object's class.
Definition: variable.c:311
VALUE rb_const_get_at(VALUE space, ID name)
Identical to rb_const_defined_at(), except it returns the actual defined value.
Definition: variable.c:2856
void rb_set_class_path_string(VALUE klass, VALUE space, VALUE name)
Identical to rb_set_class_path(), except it accepts the name as Ruby's string instead of C's.
Definition: variable.c:232
void rb_alias_variable(ID dst, ID src)
Aliases a global variable.
Definition: variable.c:860
void rb_define_class_variable(VALUE, const char *, VALUE)
Just another name of rb_cv_set.
Definition: variable.c:3733
VALUE rb_obj_remove_instance_variable(VALUE obj, VALUE name)
Resembles Object#remove_instance_variable.
Definition: variable.c:1958
void * rb_mod_const_of(VALUE, void *)
This is a variant of rb_mod_const_at().
Definition: variable.c:3048
st_index_t rb_ivar_count(VALUE obj)
Number of instance variables defined on an object.
Definition: variable.c:1835
void * rb_mod_const_at(VALUE, void *)
This API is mysterious.
Definition: variable.c:3031
VALUE rb_const_remove(VALUE space, ID name)
Identical to rb_mod_remove_const(), except it takes the name as ID instead of VALUE.
Definition: variable.c:2953
VALUE rb_const_get_from(VALUE space, ID name)
Identical to rb_const_defined_at(), except it returns the actual defined value.
Definition: variable.c:2844
VALUE rb_ivar_defined(VALUE obj, ID name)
Queries if the instance variable is defined at the object.
Definition: variable.c:1609
VALUE rb_cv_get(VALUE klass, const char *name)
Identical to rb_cvar_get(), except it accepts C's string instead of ID.
Definition: variable.c:3726
int rb_const_defined_at(VALUE space, ID name)
Identical to rb_const_defined(), except it doesn't look for parent classes.
Definition: variable.c:3164
void rb_cv_set(VALUE klass, const char *name, VALUE val)
Identical to rb_cvar_set(), except it accepts C's string instead of ID.
Definition: variable.c:3719
VALUE rb_mod_class_variables(int argc, const VALUE *argv, VALUE recv)
Resembles Module#class_variables.
Definition: variable.c:3824
VALUE rb_f_global_variables(void)
Queries the list of global variables.
Definition: variable.c:828
VALUE rb_cvar_defined(VALUE klass, ID name)
Queries if the given class has the given class variable.
Definition: variable.c:3700
VALUE rb_class_path(VALUE mod)
Identical to rb_mod_name(), except it returns #<Class: ...> style inspection for anonymous modules.
Definition: variable.c:189
int rb_const_defined_from(VALUE space, ID name)
Identical to rb_const_defined(), except it returns false for private constants.
Definition: variable.c:3152
int rb_const_defined(VALUE space, ID name)
Queries if the constant is defined at the namespace.
Definition: variable.c:3158
void rb_free_generic_ivar(VALUE obj)
Frees the list of instance variables.
Definition: variable.c:1172
int rb_respond_to(VALUE obj, ID mid)
Queries if the object responds to the method.
Definition: vm_method.c:2799
VALUE(* rb_alloc_func_t)(VALUE klass)
This is the type of functions that ruby calls when trying to allocate an object.
Definition: vm.h:216
void rb_undef_alloc_func(VALUE klass)
Deletes the allocator function of a class.
Definition: vm_method.c:1151
const char * rb_sourcefile(void)
Resembles __FILE__.
Definition: vm.c:1609
void rb_alias(VALUE klass, ID dst, ID src)
Resembles alias.
Definition: vm_method.c:2134
int rb_method_basic_definition_p(VALUE klass, ID mid)
Well... Let us hesitate from describing what a "basic definition" is.
Definition: vm_method.c:2677
void rb_attr(VALUE klass, ID name, int need_reader, int need_writer, int honour_visibility)
This function resembles now-deprecated Module#attr.
Definition: vm_method.c:1714
void rb_remove_method(VALUE klass, const char *name)
Removes a method.
Definition: vm_method.c:1563
VALUE rb_check_funcall(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv(), except it returns RUBY_Qundef instead of raising rb_eNoMethodError.
Definition: vm_eval.c:664
int rb_frame_method_id_and_class(ID *idp, VALUE *klassp)
Resembles __method__.
Definition: vm.c:2578
rb_alloc_func_t rb_get_alloc_func(VALUE klass)
Queries the allocator function of a class.
Definition: vm_method.c:1157
VALUE rb_check_funcall_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_check_funcall(), except you can specify how to handle the last element of the given a...
Definition: vm_eval.c:658
VALUE rb_mod_module_eval(int argc, const VALUE *argv, VALUE mod)
Identical to rb_obj_instance_eval(), except it evaluates within the context of module.
Definition: vm_eval.c:2138
void rb_remove_method_id(VALUE klass, ID mid)
Identical to rb_remove_method(), except it accepts the method name as ID.
Definition: vm_method.c:1557
VALUE rb_mod_module_exec(int argc, const VALUE *argv, VALUE mod)
Identical to rb_obj_instance_exec(), except it evaluates within the context of module.
Definition: vm_eval.c:2172
void rb_define_alloc_func(VALUE klass, rb_alloc_func_t func)
Sets the allocator function of a class.
VALUE rb_obj_instance_exec(int argc, const VALUE *argv, VALUE recv)
Executes the given block within the context of the receiver.
Definition: vm_eval.c:2099
VALUE rb_eval_cmd_kw(VALUE cmd, VALUE arg, int kw_splat)
This API is practically a variant of rb_proc_call_kw() now.
Definition: vm_eval.c:1900
VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker)
Raises rb_eNotImpError.
Definition: vm_method.c:360
VALUE rb_apply(VALUE recv, ID mid, VALUE args)
Identical to rb_funcallv(), except it takes Ruby's array instead of C's.
Definition: vm_eval.c:1077
VALUE rb_make_backtrace(void)
Creates the good old fashioned array-of-strings style backtrace info.
int rb_method_boundp(VALUE klass, ID id, int ex)
Queries if the klass has this method.
Definition: vm_method.c:1675
void rb_backtrace(void)
Prints the backtrace out to the standard error.
VALUE rb_obj_instance_eval(int argc, const VALUE *argv, VALUE recv)
Evaluates a string containing Ruby source code, or the given block, within the context of the receive...
Definition: vm_eval.c:2069
int rb_sourceline(void)
Resembles __LINE__.
Definition: vm.c:1623
int rb_obj_respond_to(VALUE obj, ID mid, int private_p)
Identical to rb_respond_to(), except it additionally takes the visibility parameter.
Definition: vm_method.c:2783
ID rb_intern2(const char *name, long len)
Identical to rb_intern(), except it additionally takes the length of the string.
Definition: symbol.c:775
VALUE rb_check_symbol(volatile VALUE *namep)
Identical to rb_check_id(), except it returns an instance of rb_cSymbol instead.
Definition: symbol.c:1110
static ID rb_intern_const(const char *str)
This is a "tiny optimisation" over rb_intern().
Definition: symbol.h:276
VALUE rb_id2sym(ID id)
Allocates an instance of rb_cSymbol that has the given id.
Definition: symbol.c:916
ID rb_check_id(volatile VALUE *namep)
Detects if the given name is already interned or not.
Definition: symbol.c:1077
ID rb_intern(const char *name)
Finds or creates a symbol of the given name.
Definition: symbol.c:782
VALUE rb_sym2str(VALUE id)
Identical to rb_id2str(), except it takes an instance of rb_cSymbol rather than an ID.
Definition: symbol.c:935
VALUE rb_to_symbol(VALUE name)
Identical to rb_intern_str(), except it generates a dynamic symbol if necessary.
Definition: string.c:11770
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition: symbol.c:882
ID rb_to_id(VALUE str)
Identical to rb_intern(), except it takes an instance of rb_cString.
Definition: string.c:11760
const char * rb_id2name(ID id)
Retrieves the name mapped to the given id.
Definition: symbol.c:952
ID rb_intern_str(VALUE str)
Identical to rb_intern(), except it takes an instance of rb_cString.
Definition: symbol.c:788
VALUE rb_id2str(ID id)
Identical to rb_id2name(), except it returns a Ruby's String instead of C's.
Definition: symbol.c:946
rb_gvar_setter_t rb_gvar_var_setter
Definition: variable.h:119
rb_gvar_marker_t rb_gvar_var_marker
Definition: variable.h:128
void rb_define_global_const(const char *name, VALUE val)
Identical to rb_define_const(), except it defines that of "global", i.e.
Definition: variable.c:3409
VALUE rb_gv_get(const char *name)
Obtains a global variable.
Definition: variable.c:786
void rb_define_variable(const char *name, VALUE *var)
"Shares" a global variable between Ruby and C.
Definition: variable.c:599
void rb_gvar_marker_t(VALUE *var)
Type that represents a global variable marker function.
Definition: variable.h:53
void rb_deprecate_constant(VALUE mod, const char *name)
Asserts that the given constant is deprecated.
Definition: variable.c:3457
void rb_gvar_setter_t(VALUE val, ID id, VALUE *data)
Type that represents a global variable setter function.
Definition: variable.h:46
rb_gvar_setter_t rb_gvar_val_setter
This is the setter function that backs global variables defined from a ruby script.
Definition: variable.h:94
rb_gvar_marker_t rb_gvar_undef_marker
Definition: variable.h:80
void rb_define_readonly_variable(const char *name, const VALUE *var)
Identical to rb_define_variable(), except it does not allow Ruby programs to assign values to such gl...
Definition: variable.c:605
rb_gvar_setter_t rb_gvar_readonly_setter
This function just raises rb_eNameError.
Definition: variable.h:135
rb_gvar_getter_t rb_gvar_undef_getter
Definition: variable.h:62
VALUE rb_gv_set(const char *name, VALUE val)
Assigns to a global variable.
Definition: variable.c:772
rb_gvar_marker_t rb_gvar_val_marker
This is the setter function that backs global variables defined from a ruby script.
Definition: variable.h:101
void rb_define_virtual_variable(const char *name, rb_gvar_getter_t *getter, rb_gvar_setter_t *setter)
Defines a global variable that is purely function-backended.
Definition: variable.c:611
void rb_define_const(VALUE klass, const char *name, VALUE val)
Defines a Ruby level constant under a namespace.
Definition: variable.c:3397
VALUE rb_gvar_getter_t(ID id, VALUE *data)
Type that represents a global variable getter function.
Definition: variable.h:37
VALUE rb_iv_get(VALUE obj, const char *name)
Obtains an instance variable.
Definition: variable.c:3881
rb_gvar_setter_t rb_gvar_undef_setter
Definition: variable.h:71
rb_gvar_getter_t rb_gvar_val_getter
This is the getter function that backs global variables defined from a ruby script.
Definition: variable.h:87
VALUE rb_iv_set(VALUE obj, const char *name, VALUE val)
Assigns to an instance variable.
Definition: variable.c:3892
void rb_define_hooked_variable(const char *name, VALUE *var, rb_gvar_getter_t *getter, rb_gvar_setter_t *setter)
Identical to rb_define_virtual_variable(), but can also specify a storage.
Definition: variable.c:580
rb_gvar_getter_t rb_gvar_var_getter
Definition: variable.h:110
VALUE rb_io_get_io(VALUE io)
Identical to rb_io_check_io(), except it raises exceptions on conversion failures.
Definition: io.c:802
const struct rb_ractor_local_storage_type rb_ractor_local_storage_type_free
A type of ractor-local storage that destructs itself using ruby_xfree.
Definition: ractor.c:3094
VALUE rb_ractor_make_shareable_copy(VALUE obj)
Identical to rb_ractor_make_shareable(), except it returns a (deep) copy of the passed one instead of...
Definition: ractor.c:2508
struct rb_ractor_local_key_struct * rb_ractor_local_key_t
(Opaque) struct that holds a ractor-local storage key.
Definition: ractor.h:42
void * rb_ractor_local_storage_ptr(rb_ractor_local_key_t key)
Identical to rb_ractor_local_storage_value() except the return type.
Definition: ractor.c:3203
void rb_ractor_local_storage_ptr_set(rb_ractor_local_key_t key, void *ptr)
Identical to rb_ractor_local_storage_value_set() except the parameter type.
Definition: ractor.c:3215
rb_ractor_local_key_t rb_ractor_local_storage_ptr_newkey(const struct rb_ractor_local_storage_type *type)
Extended version of rb_ractor_local_storage_value_newkey().
Definition: ractor.c:3105
VALUE rb_ractor_stderr(void)
Queries the standard error of the current Ractor that is calling this function.
Definition: ractor.c:2148
VALUE rb_ractor_stdin(void)
Queries the standard input of the current Ractor that is calling this function.
Definition: ractor.c:2124
static bool rb_ractor_shareable_p(VALUE obj)
Queries if multiple Ractors can share the passed object or not.
Definition: ractor.h:249
void rb_ractor_stderr_set(VALUE io)
Assigns an IO to the standard error of the Ractor that is calling this function.
Definition: ractor.c:2184
void rb_ractor_local_storage_value_set(rb_ractor_local_key_t key, VALUE val)
Associates the passed value to the passed key.
Definition: ractor.c:3197
bool rb_ractor_local_storage_value_lookup(rb_ractor_local_key_t key, VALUE *val)
Queries the key.
Definition: ractor.c:3186
VALUE rb_ractor_stdout(void)
Queries the standard output of the current Ractor that is calling this function.
Definition: ractor.c:2136
VALUE rb_ractor_make_shareable(VALUE obj)
Destructively transforms the passed object so that multiple Ractors can share it.
Definition: ractor.c:2499
rb_ractor_local_key_t rb_ractor_local_storage_value_newkey(void)
Issues a new key.
Definition: ractor.c:3114
void rb_ractor_stdout_set(VALUE io)
Assigns an IO to the standard output of the Ractor that is calling this function.
Definition: ractor.c:2172
void rb_ractor_stdin_set(VALUE io)
Assigns an IO to the standard input of the Ractor that is calling this function.
Definition: ractor.c:2160
VALUE rb_ractor_local_storage_value(rb_ractor_local_key_t key)
Queries the key.
Definition: ractor.c:3174
#define strtod(s, e)
Just another name of ruby_strtod.
Definition: util.h:212
#define strdup(s)
Just another name of ruby_strdup.
Definition: util.h:176
const int ruby_api_version[3]
API versions, in { major, minor, teeny } order.
Definition: version.c:27
void ruby_vm_at_exit(void(*func)(ruby_vm_t *))
ruby_vm_at_exit registers a function func to be invoked when a VM passed away.
Definition: vm.c:699
int ruby_vm_destruct(ruby_vm_t *vm)
Destructs the passed VM.
Definition: vm.c:2778
static unsigned int RB_FIX2UINT(VALUE x)
Converts a Fixnum into C's int.
Definition: int.h:208
unsigned long rb_num2uint(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned long.
Definition: numeric.c:3296
long rb_fix2int(VALUE num)
Identical to rb_num2int().
Definition: numeric.c:3290
static int rb_num2int_inline(VALUE x)
Converts an instance of rb_cNumeric into C's int.
Definition: int.h:158
long rb_num2int(VALUE num)
Converts an instance of rb_cNumeric into C's long.
Definition: numeric.c:3284
static VALUE rb_uint2num_inline(unsigned int v)
Converts a C's unsigned int into an instance of rb_cInteger.
Definition: int.h:254
static int RB_FIX2INT(VALUE x)
Converts a Fixnum into C's int.
Definition: int.h:129
static unsigned int RB_NUM2UINT(VALUE x)
Converts an instance of rb_cNumeric into C's unsigned int.
Definition: int.h:185
static VALUE rb_int2num_inline(int v)
Converts a C's int into an instance of rb_cInteger.
Definition: int.h:239
unsigned long rb_fix2uint(VALUE num)
Identical to rb_num2uint().
Definition: numeric.c:3302
VALUE rb_str_format(int argc, const VALUE *argv, VALUE fmt)
Formats a string.
Definition: sprintf.c:214
VALUE rb_f_sprintf(int argc, const VALUE *argv)
Identical to rb_str_format(), except how the arguments are arranged.
Definition: sprintf.c:208
VALUE rb_sprintf(const char *fmt,...)
Ruby's extended sprintf(3).
Definition: sprintf.c:1201
VALUE rb_str_vcatf(VALUE dst, const char *fmt, va_list ap)
Identical to rb_str_catf(), except it takes a va_list.
Definition: sprintf.c:1214
VALUE rb_vsprintf(const char *fmt, va_list ap)
Identical to rb_sprintf(), except it takes a va_list.
Definition: sprintf.c:1195
VALUE rb_str_catf(VALUE dst, const char *fmt,...)
Identical to rb_sprintf(), except it renders the output to the specified object rather than creating ...
Definition: sprintf.c:1241
LONG_LONG rb_num2ll(VALUE num)
Converts an instance of rb_cNumeric into C's long long.
unsigned LONG_LONG rb_num2ull(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned long long.
VALUE rb_ull2inum(unsigned LONG_LONG num)
Converts a C's unsigned long long into an instance of rb_cInteger.
VALUE rb_ll2inum(LONG_LONG num)
Converts a C's long long into an instance of rb_cInteger.
static LONG_LONG rb_num2ll_inline(VALUE x)
Converts an instance of rb_cNumeric into C's long long.
Definition: long_long.h:110
VALUE rb_int2inum(intptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition: bignum.c:3237
VALUE rb_uint2big(uintptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition: bignum.c:3187
VALUE rb_int2big(intptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition: bignum.c:3209
VALUE rb_uint2inum(uintptr_t i)
Converts a C's uintptr_t into an instance of rb_cInteger.
Definition: bignum.c:3230
VALUE rb_catch_obj(VALUE tag, rb_block_call_func_t func, VALUE data)
Identical to rb_catch(), except it catches arbitrary Ruby objects.
Definition: vm_eval.c:2401
VALUE rb_each(VALUE obj)
This is a shorthand of calling obj.each.
Definition: vm_eval.c:1657
VALUE rb_block_call(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t proc, VALUE data2)
Identical to rb_funcallv(), except it additionally passes a function as a block.
Definition: vm_eval.c:1595
VALUE rb_yield_values(int n,...)
Identical to rb_yield(), except it takes variadic number of parameters and pass them to the block.
Definition: vm_eval.c:1369
VALUE rb_yield_splat(VALUE ary)
Identical to rb_yield_values(), except it splats an array to generate the list of parameters.
Definition: vm_eval.c:1403
void rb_throw(const char *tag, VALUE val)
Transfers control to the end of the active catch block waiting for tag.
Definition: vm_eval.c:2289
VALUE rb_yield_values2(int n, const VALUE *argv)
Identical to rb_yield_values(), except it takes the parameters as a C array instead of variadic argum...
Definition: vm_eval.c:1391
VALUE rb_yield(VALUE val)
Yields the block.
Definition: vm_eval.c:1357
VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat)
Identical to rb_yield_values2(), except you can specify how to handle the last element of the given a...
Definition: vm_eval.c:1397
rb_block_call_func * rb_block_call_func_t
Shorthand type that represents an iterator-written-in-C function pointer.
Definition: iterator.h:88
VALUE rb_yield_block(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
Pass a passed block.
void rb_throw_obj(VALUE tag, VALUE val)
Identical to rb_throw(), except it allows arbitrary Ruby object to become a tag.
Definition: vm_eval.c:2264
VALUE rb_block_call_func(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
This is the type of a function that the interpreter expect for C-backended blocks.
Definition: iterator.h:83
VALUE rb_iterate(VALUE(*func1)(VALUE), VALUE data1, rb_block_call_func_t proc, VALUE data2)
Old way to iterate a block.
Definition: vm_eval.c:1569
VALUE rb_catch(const char *tag, rb_block_call_func_t func, VALUE data)
Executes the passed block and catches values thrown from inside of it.
Definition: vm_eval.c:2359
VALUE rb_block_call_kw(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t proc, VALUE data2, int kw_splat)
Identical to rb_funcallv_kw(), except it additionally passes a function as a block.
Definition: vm_eval.c:1602
VALUE rb_yield_splat_kw(VALUE ary, int kw_splat)
Identical to rb_yield_splat(), except you can specify how to handle the last element of the given arr...
Definition: vm_eval.c:1416
static int rb_fd_max(const rb_fdset_t *f)
It seems this function has no use.
Definition: largesize.h:209
int rb_fd_select(int nfds, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout)
Waits for multiple file descriptors at once.
int rb_fd_isset(int fd, const rb_fdset_t *f)
Queries if the given FD is in the given set.
void rb_fd_clr(int fd, rb_fdset_t *f)
Releases a specific FD from the given fdset.
void rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int max)
Destructively overwrites an fdset with another.
void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
Identical to rb_fd_copy(), except it copies unlimited number of file descriptors.
void rb_fd_term(rb_fdset_t *f)
Destroys the rb_fdset_t, releasing any memory and resources it used.
void rb_fd_zero(rb_fdset_t *f)
Wipes out the current set of FDs.
static fd_set * rb_fd_ptr(const rb_fdset_t *f)
Raw pointer to fd_set.
Definition: largesize.h:195
static long rb_num2long_inline(VALUE x)
Converts an instance of rb_cNumeric into C's long.
Definition: long.h:267
static VALUE RB_INT2FIX(long i)
Converts a C's long into an instance of rb_cInteger.
Definition: long.h:111
static unsigned long rb_num2ulong_inline(VALUE x)
Converts an instance of rb_cNumeric into C's unsigned long.
Definition: long.h:293
static int rb_long2int_inline(long n)
Checks if int can hold the given integer.
Definition: long.h:135
static VALUE rb_ulong2num_inline(unsigned long v)
Converts a C's unsigned long into an instance of rb_cInteger.
Definition: long.h:323
static long rb_fix2long(VALUE x)
Converts a Fixnum into C's long.
Definition: long.h:231
void rb_out_of_int(SIGNED_VALUE num)
This is an utility function to raise an rb_eRangeError.
Definition: numeric.c:3211
long rb_num2long(VALUE num)
Converts an instance of rb_cNumeric into C's long.
Definition: numeric.c:3136
unsigned long rb_num2ulong(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned long.
Definition: numeric.c:3205
static VALUE rb_long2num_inline(long v)
Converts a C's long into an instance of rb_cInteger.
Definition: long.h:308
static unsigned long rb_fix2ulong(VALUE x)
Converts a Fixnum into C's unsigned long.
Definition: long.h:252
VALUE rb_marshal_dump(VALUE obj, VALUE port)
Serialises the given object and all its referring objects, to write them down to the passed port.
Definition: marshal.c:2423
void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE(*dumper)(VALUE), VALUE(*loader)(VALUE, VALUE))
Marshal format compatibility layer.
Definition: marshal.c:148
VALUE rb_marshal_load(VALUE port)
Deserialises a previous output of rb_marshal_dump() into a network of objects.
Definition: marshal.c:2429
static void * rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize)
This is an implementation detail of RB_ALLOCV_N().
Definition: memory.h:640
static int rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
Definition: memory.h:525
VALUE type(ANYARGS)
ANYARGS-ed function type.
Definition: cxxanyargs.hpp:56
VALUE rb_newobj(void)
This is the implementation detail of RB_NEWOBJ.
Definition: gc.c:2826
void rb_copy_generic_ivar(VALUE clone, VALUE obj)
Copies the list of instance variables.
Definition: variable.c:1736
VALUE rb_newobj_of(VALUE klass, VALUE flags)
This is the implementation detail of RB_NEWOBJ_OF.
Definition: gc.c:2832
static void rb_clone_setup(VALUE clone, VALUE obj)
Definition: newobj.h:173
static void rb_dup_setup(VALUE dup, VALUE obj)
Definition: newobj.h:190
const char * ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encoding *enc)
Our own encoding-aware version of basename(3).
Definition: file.c:4592
char * rb_enc_path_end(const char *path, const char *end, rb_encoding *enc)
This just returns the passed end basically.
Definition: file.c:3467
char * rb_enc_path_last_separator(const char *path, const char *end, rb_encoding *enc)
Returns the last path component.
Definition: file.c:3433
char * rb_enc_path_next(const char *path, const char *end, rb_encoding *enc)
Returns a path component directly adjacent to the passed pointer.
Definition: file.c:3385
char * rb_enc_path_skip_prefix(const char *path, const char *end, rb_encoding *enc)
Seeks for non-prefix part of a pathname.
Definition: file.c:3399
const char * ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc)
Our own encoding-aware version of extname.
Definition: file.c:4839
#define rb_fd_init
Initialises the :given :rb_fdset_t.
Definition: posix.h:63
#define rb_fd_set
Sets the given fd to the rb_fdset_t.
Definition: posix.h:54
fd_set rb_fdset_t
The data structure which wraps the fd_set bitmap used by select(2).
Definition: posix.h:48
static long RARRAY_EMBED_LEN(VALUE ary)
Queries the length of the array.
Definition: rarray.h:297
void rb_ary_detransient(VALUE a)
Destructively converts an array of transient backend into ordinal one.
Definition: array.c:458
static long rb_array_len(VALUE a)
Queries the length of the array.
Definition: rarray.h:317
static bool RARRAY_TRANSIENT_P(VALUE ary)
Queries if the array is a transient array.
Definition: rarray.h:364
static int RARRAY_LENINT(VALUE ary)
Identical to rb_array_len(), except it differs for the return type.
Definition: rarray.h:343
static void RARRAY_ASET(VALUE ary, long i, VALUE v)
Assigns an object in an array.
Definition: rarray.h:590
static VALUE * RARRAY_PTR(VALUE ary)
Wild use of a C pointer.
Definition: rarray.h:570
@ RARRAY_EMBED_LEN_SHIFT
Where ::RARRAY_EMBED_LEN_MASK resides.
Definition: rarray.h:165
#define RARRAY_AREF(a, i)
Definition: rarray.h:607
static VALUE RBASIC_CLASS(VALUE obj)
Queries the class of an object.
Definition: rbasic.h:152
@ RVALUE_EMBED_LEN_MAX
Max possible number of objects that can be embedded.
Definition: rbasic.h:55
int rb_big_sign(VALUE num)
The "sign" of a bignum.
Definition: bignum.c:6788
static bool RBIGNUM_NEGATIVE_P(VALUE b)
Checks if the bignum is negative.
Definition: rbignum.h:74
static bool RBIGNUM_POSITIVE_P(VALUE b)
Checks if the bignum is positive.
Definition: rbignum.h:61
#define RCLASS_SUPER
Just another name of rb_class_get_superclass.
Definition: rclass.h:44
VALUE rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
This is the primitive way to wrap an existing C struct into RData.
Definition: gc.c:2978
static VALUE rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
Definition: rdata.h:367
static VALUE rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_func, void **datap, size_t size)
This is an implementation detail of Data_Make_Struct.
Definition: rdata.h:358
VALUE rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
Identical to rb_data_object_wrap(), except it allocates a new data region internally instead of takin...
Definition: gc.c:2986
void(* RUBY_DATA_FUNC)(void *)
This is the type of callbacks registered to RData.
Definition: rdata.h:108
static VALUE rb_obj_wb_unprotect(VALUE x, const char *filename, int line)
This is the implementation of RB_OBJ_WB_UNPROTECT().
Definition: rgengc.h:363
void rb_gc_writebarrier(VALUE old, VALUE young)
This is the implementation of RB_OBJ_WRITE().
Definition: gc.c:8721
void rb_gc_writebarrier_unprotect(VALUE obj)
This is the implementation of RB_OBJ_WB_UNPROTECT().
Definition: gc.c:8757
static bool RB_OBJ_PROMOTED(VALUE obj)
Tests if the object is "promoted" – that is, whether the object experienced one or more GC marks.
Definition: rgengc.h:343
static bool RB_OBJ_PROMOTED_RAW(VALUE obj)
This is the implementation of RB_OBJ_PROMOTED().
Definition: rgengc.h:323
VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone)
This is the implementation detail of RHASH_SET_IFNONE.
Definition: hash.c:99
#define RHASH_IFNONE(h)
Definition: rhash.h:72
struct st_table * rb_hash_tbl(VALUE hash, const char *file, int line)
This is the implementation detail of RHASH_TBL.
Definition: hash.c:1621
#define RHASH_SIZE(h)
Queries the size of the hash.
Definition: rhash.h:82
size_t rb_hash_size_num(VALUE hash)
This is the implementation detail of RHASH_SIZE.
Definition: hash.c:2986
#define RHASH_EMPTY_P(h)
Checks if the hash is empty.
Definition: rhash.h:92
@ ROBJECT_EMBED_LEN_MAX
Max possible number of instance variables that can be embedded.
Definition: robject.h:84
static uint32_t ROBJECT_NUMIV(VALUE obj)
Queries the number of instance variables.
Definition: robject.h:145
static VALUE * ROBJECT_IVPTR(VALUE obj)
Queries the instance variables.
Definition: robject.h:171
static VALUE RREGEXP_SRC(VALUE rexp)
Convenient getter function.
Definition: rregexp.h:103
static char * RREGEXP_SRC_END(VALUE rexp)
Convenient getter function.
Definition: rregexp.h:163
static long RREGEXP_SRC_LEN(VALUE rexp)
Convenient getter function.
Definition: rregexp.h:144
static char * RREGEXP_SRC_PTR(VALUE rexp)
Convenient getter function.
Definition: rregexp.h:125
VALUE rb_str_export_locale(VALUE obj)
Identical to rb_str_export(), except it converts into the locale encoding instead.
Definition: string.c:1266
char * rb_string_value_cstr(volatile VALUE *ptr)
Identical to rb_string_value_ptr(), except it additionally checks for the contents for viability as a...
Definition: string.c:2575
static long RSTRING_EMBED_LEN(VALUE str)
Queries the length of the string.
Definition: rstring.h:423
static int RSTRING_LENINT(VALUE str)
Identical to RSTRING_LEN(), except it differs for the return type.
Definition: rstring.h:554
static char * RSTRING_END(VALUE str)
Queries the end of the contents pointer of the string.
Definition: rstring.h:528
VALUE rb_string_value(volatile VALUE *ptr)
Identical to rb_str_to_str(), except it fills the passed pointer with the converted object.
Definition: string.c:2459
static long RSTRING_LEN(VALUE str)
Queries the length of the string.
Definition: rstring.h:484
VALUE rb_str_export(VALUE obj)
Identical to rb_str_to_str(), except it additionally converts the string into default external encodi...
Definition: string.c:1260
char * rb_string_value_ptr(volatile VALUE *ptr)
Identical to rb_str_to_str(), except it returns the converted string's backend memory region.
Definition: string.c:2470
VALUE rb_str_to_str(VALUE obj)
Identical to rb_check_string_type(), except it raises exceptions in case of conversion failures.
Definition: string.c:1570
static char * RSTRING_PTR(VALUE str)
Queries the contents pointer of the string.
Definition: rstring.h:498
static long RSTRUCT_LEN(VALUE st)
Returns the number of struct members.
Definition: rstruct.h:94
static VALUE RSTRUCT_SET(VALUE st, int k, VALUE v)
Resembles Struct#[]=.
Definition: rstruct.h:104
static VALUE RSTRUCT_GET(VALUE st, int k)
Resembles Struct#[].
Definition: rstruct.h:114
VALUE rb_struct_aset(VALUE st, VALUE k, VALUE v)
Resembles Struct#[]=.
Definition: struct.c:1221
VALUE rb_struct_size(VALUE st)
Returns the number of struct members.
Definition: struct.c:1474
VALUE rb_struct_aref(VALUE st, VALUE k)
Resembles Struct#[].
Definition: struct.c:1183
static bool RTYPEDDATA_P(VALUE obj)
Checks whether the passed object is RTypedData or RData.
Definition: rtypeddata.h:540
VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *type)
This is the primitive way to wrap an existing C struct into RTypedData.
Definition: gc.c:2994
VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type)
Identical to rb_data_typed_object_wrap(), except it allocates a new data region internally instead of...
Definition: gc.c:3002
static VALUE rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
Definition: rtypeddata.h:599
static VALUE rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size)
While we don't stop you from using this function, it seems to be an implementation detail of TypedDat...
Definition: rtypeddata.h:590
static const struct rb_data_type_struct * RTYPEDDATA_TYPE(VALUE obj)
Queries for the type of given object.
Definition: rtypeddata.h:563
VALUE rb_argv0
The value of $0 at process bootup.
Definition: ruby.c:1566
VALUE rb_get_argv(void)
Queries the arguments passed to the current process that you can access from Ruby as ARGV.
Definition: io.c:13963
void * rb_load_file_str(VALUE file)
Identical to rb_load_file(), except it takes the argument as a Ruby's string instead of C's.
Definition: ruby.c:2410
void * rb_load_file(const char *file)
Loads the given file.
Definition: ruby.c:2403
VALUE rb_get_path(VALUE obj)
Converts an object to a path.
Definition: file.c:245
const char * rb_class2name(VALUE klass)
Queries the name of the passed class.
Definition: variable.c:317
VALUE rb_require(const char *feature)
Identical to rb_require_string(), except it takes C's string instead of Ruby's.
Definition: load.c:1273
const char * rb_obj_classname(VALUE obj)
Queries the name of the class of the passed object.
Definition: variable.c:326
void rb_p(VALUE obj)
Inspects an object.
Definition: io.c:8670
int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap)
Identical to ruby_snprintf(), except it takes a va_list.
Definition: sprintf.c:1008
VALUE rb_get_path_no_checksafe(VALUE)
Definition: file.c:239
int ruby_native_thread_p(void)
Queries if the thread which calls this function is a ruby's thread.
Definition: thread.c:5338
int ruby_snprintf(char *str, size_t n, char const *fmt,...)
Our own locale-insensitive version of snprintf(3).
Definition: sprintf.c:1035
int rb_thread_fd_select(int nfds, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout)
Waits for multiple file descriptors at once.
Definition: thread.c:4118
short rb_num2short(VALUE num)
Converts an instance of rb_cNumeric into C's short.
Definition: numeric.c:3340
unsigned short rb_num2ushort(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned short.
Definition: numeric.c:3358
short rb_fix2short(VALUE num)
Identical to rb_num2short().
Definition: numeric.c:3349
unsigned short rb_fix2ushort(VALUE num)
Identical to rb_num2ushort().
Definition: numeric.c:3368
static short rb_num2short_inline(VALUE x)
Identical to rb_num2short().
Definition: short.h:105
static bool RB_STATIC_SYM_P(VALUE obj)
Checks if the given object is a static symbol.
static bool RB_TEST(VALUE obj)
Emulates Ruby's "if" statement.
static bool RB_FIXNUM_P(VALUE obj)
Checks if the given object is a so-called Fixnum.
static bool RB_IMMEDIATE_P(VALUE obj)
Checks if the given object is an immediate i.e.
static bool RB_SPECIAL_CONST_P(VALUE obj)
Checks if the given object is of enum ruby_special_consts.
static VALUE rb_special_const_p(VALUE obj)
Identical to RB_SPECIAL_CONST_P, except it returns a VALUE.
@ RUBY_Qtrue
@ RUBY_SPECIAL_SHIFT
Least significant 8 bits are reserved.
@ RUBY_FIXNUM_FLAG
Flag to denote a fixnum.
@ RUBY_Qnil
@ RUBY_FLONUM_MASK
Bit mask detecting a flonum.
@ RUBY_FLONUM_FLAG
Flag to denote a flonum.
@ RUBY_Qundef
Represents so-called undef.
@ RUBY_SYMBOL_FLAG
Flag to denote a static symbol.
@ RUBY_IMMEDIATE_MASK
Bit mask detecting special consts.
@ RUBY_Qfalse
static bool RB_NIL_P(VALUE obj)
Checks if the given object is nil.
static bool RB_FLONUM_P(VALUE obj)
Checks if the given object is a so-called Flonum.
static VALUE RB_ST2FIX(st_data_t i)
Converts a C's st_data_t into an instance of rb_cInteger.
Definition: st_data_t.h:59
#define _(args)
This was a transition path from K&R to ANSI.
Definition: stdarg.h:35
const VALUE ary[RARRAY_EMBED_LEN_MAX]
Embedded elements.
struct RBasic basic
Basic part, including flags and class.
const VALUE shared_root
Parent of the array.
long capa
Capacity of *ptr.
long len
Number of elements of the array.
const VALUE * ptr
Pointer to the C array that holds the elements of the array.
Ruby's object's, base components.
Definition: rbasic.h:64
const VALUE klass
Class of an object.
Definition: rbasic.h:88
VALUE flags
Per-object flags.
Definition: rbasic.h:77
RUBY_DATA_FUNC dfree
This function is called when the object is no longer used.
void * data
Pointer to the actual C level struct that you want to wrap.
RUBY_DATA_FUNC dmark
This function is called when the object is experiencing GC marks.
struct RBasic basic
Basic part, including flags and class.
Ruby's File and IO.
struct RBasic basic
Basic part, including flags and class.
struct rb_io_t * fptr
IO's specific fields.
Ruby's ordinal objects.
struct st_table * iv_index_tbl
This is a table that holds instance variable name to index mapping.
struct RBasic basic
Basic part, including flags and class.
VALUE * ivptr
Pointer to a C array that holds instance variables.
uint32_t numiv
Number of instance variables.
VALUE ary[ROBJECT_EMBED_LEN_MAX]
Embedded instance variables.
Ruby's regular expression.
struct RBasic basic
Basic part, including flags and class.
const VALUE src
Source code of this expression.
struct re_pattern_buffer * ptr
The pattern buffer.
unsigned long usecnt
Reference count.
Ruby's String.
struct RBasic basic
Basic part, including flags and class.
long capa
Capacity of *ptr.
long len
Length of the string, not including terminating NUL character.
VALUE shared
Parent of the string.
char * ptr
Pointer to the contents of the string.
"Typed" user data.
const rb_data_type_t * type
This field stores various information about how Ruby should handle a data.
VALUE typed_flag
This has to be always 1.
void * data
Pointer to the actual C level struct that you want to wrap.
struct RBasic basic
The part that all ruby objects have in common.
Definition: gc.c:575
comment represents a sequence of comment lines.
Definition: parserstate.h:33
Definition: gc.c:904
Definition: lex.c:34
Definition: lexer.h:99
Decomposed Enumerator::ArithmeicSequence.
CREF (Class REFerence)
This is the struct that holds necessary info for a struct.
size_t(* dsize)(const void *)
This function is to query the size of the underlying memory regions.
RUBY_DATA_FUNC dfree
This function is called when the object is no longer used.
void * data
Type-specific static data.
void * reserved[1]
This field is reserved for future extension.
RUBY_DATA_FUNC dcompact
This function is called when the object is relocated.
RUBY_DATA_FUNC dmark
This function is called when the object is experiencing GC marks.
const char * wrap_struct_name
Name of structs of this kind.
VALUE flags
Type-specific behavioural characteristics.
const rb_data_type_t * parent
Parent of this class.
The data structure which wraps the fd_set bitmap used by select(2).
Ruby's IO, metadata and buffers.
Definition: io.h:99
const rb_iseq_t *const iseqptr
iseq pointer, should be separated from iseqval
rb_cref_t *const cref
class reference, should be marked
Type that defines a ractor-local storage.
Internal header for Class.
This is an implementation detail of rbimpl_size_mul_overflow().
size_t right
Multiplication result.
Definition: st.c:133
IFUNC (Internal FUNCtion)
SVAR (Special VARiable)
const VALUE cref_or_me
class reference or rb_method_entry_t
void rb_nativethread_lock_lock(rb_nativethread_lock_t *lock)
Blocks until the current thread obtains a lock.
Definition: thread.c:295
rb_nativethread_id_t rb_nativethread_self(void)
Queries the ID of the native thread that is calling this function.
void rb_native_mutex_lock(rb_nativethread_lock_t *lock)
Just another name of rb_nativethread_lock_lock.
void rb_native_cond_initialize(rb_nativethread_cond_t *cond)
Fills the passed condition variable with an initial value.
int rb_native_mutex_trylock(rb_nativethread_lock_t *lock)
Identical to rb_native_mutex_lock(), except it doesn't block in case rb_native_mutex_lock() would.
void rb_native_cond_broadcast(rb_nativethread_cond_t *cond)
Signals a condition variable.
void rb_native_mutex_initialize(rb_nativethread_lock_t *lock)
Just another name of rb_nativethread_lock_initialize.
void rb_native_mutex_unlock(rb_nativethread_lock_t *lock)
Just another name of rb_nativethread_lock_unlock.
void rb_nativethread_lock_unlock(rb_nativethread_lock_t *lock)
Releases a lock.
Definition: thread.c:301
void rb_native_mutex_destroy(rb_nativethread_lock_t *lock)
Just another name of rb_nativethread_lock_destroy.
void rb_native_cond_destroy(rb_nativethread_cond_t *cond)
Destroys the passed condition variable.
void rb_native_cond_signal(rb_nativethread_cond_t *cond)
Signals a condition variable.
void rb_nativethread_lock_initialize(rb_nativethread_lock_t *lock)
Fills the passed lock with an initial value.
Definition: thread.c:283
void rb_native_cond_wait(rb_nativethread_cond_t *cond, rb_nativethread_lock_t *mutex)
Waits for the passed condition variable to be signalled.
void rb_native_cond_timedwait(rb_nativethread_cond_t *cond, rb_nativethread_lock_t *mutex, unsigned long msec)
Identical to rb_native_cond_wait(), except it additionally takes timeout in msec resolution.
void rb_nativethread_lock_destroy(rb_nativethread_lock_t *lock)
Destroys the passed mutex.
Definition: thread.c:289
Definition: dtoa.c:302
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition: value.h:52
uintptr_t VALUE
Type that represents a Ruby object.
Definition: value.h:40
static enum ruby_value_type rb_type(VALUE obj)
Identical to RB_BUILTIN_TYPE(), except it can also accept special constants.
Definition: value_type.h:224
static enum ruby_value_type RB_BUILTIN_TYPE(VALUE obj)
Queries the type of the object.
Definition: value_type.h:181
static bool RB_FLOAT_TYPE_P(VALUE obj)
Queries if the object is an instance of rb_cFloat.
Definition: value_type.h:263
static bool RB_SYMBOL_P(VALUE obj)
Queries if the object is an instance of rb_cSymbol.
Definition: value_type.h:306
static void Check_Type(VALUE v, enum ruby_value_type t)
Identical to RB_TYPE_P(), except it raises exceptions on predication failure.
Definition: value_type.h:432
static bool rb_integer_type_p(VALUE obj)
Queries if the object is an instance of rb_cInteger.
Definition: value_type.h:203
static bool RB_DYNAMIC_SYM_P(VALUE obj)
Queries if the object is a dynamic symbol.
Definition: value_type.h:286
static bool RB_TYPE_P(VALUE obj, enum ruby_value_type t)
Queries if the given object is of given type.
Definition: value_type.h:375
@ RUBY_T_SYMBOL
Definition: value_type.h:134
@ RUBY_T_MATCH
Definition: value_type.h:127
@ RUBY_T_MODULE
Definition: value_type.h:117
@ RUBY_T_ICLASS
Hidden classes known as IClasses.
Definition: value_type.h:140
@ RUBY_T_MOVED
Definition: value_type.h:142
@ RUBY_T_FIXNUM
Integers formerly known as Fixnums.
Definition: value_type.h:135
@ RUBY_T_IMEMO
Definition: value_type.h:138
@ RUBY_T_NODE
Definition: value_type.h:139
@ RUBY_T_OBJECT
Definition: value_type.h:115
@ RUBY_T_DATA
Definition: value_type.h:126
@ RUBY_T_FALSE
Definition: value_type.h:133
@ RUBY_T_UNDEF
Definition: value_type.h:136
@ RUBY_T_COMPLEX
Definition: value_type.h:128
@ RUBY_T_STRING
Definition: value_type.h:119
@ RUBY_T_HASH
Definition: value_type.h:122
@ RUBY_T_NIL
Definition: value_type.h:131
@ RUBY_T_CLASS
Definition: value_type.h:116
@ RUBY_T_ARRAY
Definition: value_type.h:121
@ RUBY_T_MASK
Bitmask of ruby_value_type.
Definition: value_type.h:144
@ RUBY_T_RATIONAL
Definition: value_type.h:129
@ RUBY_T_ZOMBIE
Definition: value_type.h:141
@ RUBY_T_BIGNUM
Definition: value_type.h:124
@ RUBY_T_TRUE
Definition: value_type.h:132
@ RUBY_T_FLOAT
Definition: value_type.h:118
@ RUBY_T_STRUCT
Definition: value_type.h:123
@ RUBY_T_NONE
Non-object (swept etc.)
Definition: value_type.h:113
@ RUBY_T_REGEXP
Definition: value_type.h:120
@ RUBY_T_FILE
Definition: value_type.h:125
void * ruby_xrealloc(void *ptr, size_t newsiz)
Resize the storage instance.
Definition: gc.c:14191
void * ruby_xrealloc2(void *ptr, size_t newelems, size_t newsiz)
Identical to ruby_xrealloc(), except it resizes the given storage instance to newelems * newsiz bytes...
Definition: gc.c:14201
void ruby_xfree(void *ptr)
Deallocates a storage instance.
Definition: gc.c:12226
void * ruby_xmalloc2(size_t nelems, size_t elemsiz)
Identical to ruby_xmalloc(), except it allocates nelems * elemsiz bytes.
Definition: gc.c:14171
void * ruby_xmalloc(size_t size)
Allocates a storage instance.
Definition: gc.c:14161
void * ruby_xcalloc(size_t nelems, size_t elemsiz)
Identical to ruby_xmalloc2(), except it returns a zero-filled storage instance.
Definition: gc.c:14181